{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow as tf\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import os\n",
    "import sys\n",
    "import ipdb\n",
    "import time\n",
    "import cv2\n",
    "from keras.preprocessing import sequence\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "tf.reset_default_graph()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Video_Caption_Generator() :\n",
    "    def __init__(self, dim_image, n_words, dim_hidden, batch_size, n_lstm_steps, n_video_lstm_step, n_caption_lstm_step, bias_init_vector=None):\n",
    "        self.dim_image = dim_image\n",
    "        self.n_words = n_words\n",
    "        self.dim_hidden = dim_hidden\n",
    "        self.batch_size = batch_size\n",
    "        self.n_lstm_steps = n_lstm_steps\n",
    "        self.n_video_lstm_step=n_video_lstm_step\n",
    "        self.n_caption_lstm_step=n_caption_lstm_step\n",
    "        \n",
    "        with tf.variable_scope('generator', reuse=tf.AUTO_REUSE) as scope:\n",
    "            with tf.device(\"/cpu:0\"):\n",
    "                self.Wemb = tf.Variable( tf.random_uniform([n_words, dim_hidden], -0.1, 0.1), name = 'Wemb')\n",
    "\n",
    "            self.lstm1 = tf.nn.rnn_cell.BasicLSTMCell(dim_hidden, state_is_tuple=False,name = 'basic_lstm_cell_1')\n",
    "            self.lstm2 = tf.nn.rnn_cell.BasicLSTMCell(dim_hidden, state_is_tuple=False,name= 'basic_lstm_cell_2')\n",
    "\n",
    "            self.encode_image_W = tf.Variable( tf.random_uniform([dim_image, dim_hidden], -0.1, 0.1),  name='encode_image_W')\n",
    "            self.encode_image_b = tf.Variable( tf.zeros([dim_hidden]), name='encode_image_b')\n",
    "\n",
    "            self.embed_word_W = tf.Variable(tf.random_uniform([dim_hidden, n_words], -0.1,0.1), name='embed_word_W')\n",
    "\n",
    "            if bias_init_vector is not None:\n",
    "                self.embed_word_b = tf.Variable(bias_init_vector.astype(np.float32), name='embed_word_b')\n",
    "            else:\n",
    "                self.embed_word_b = tf.Variable(tf.zeros([n_words]), name='embed_word_b')\n",
    "\n",
    "    \n",
    "    def build_model(self) :\n",
    "        video = tf.placeholder(tf.float32, [self.batch_size, self.n_video_lstm_step, self.dim_image])\n",
    "        video_mask = tf.placeholder(tf.float32, [self.batch_size, self.n_video_lstm_step])\n",
    "        \n",
    "        caption = tf.placeholder(tf.int32, [self.batch_size, self.n_caption_lstm_step+1])\n",
    "        caption_mask = tf.placeholder(tf.float32, [self.batch_size, self.n_caption_lstm_step+1])\n",
    "        \n",
    "        video_flat = tf.reshape(video, [-1, self.dim_image])\n",
    "        \n",
    "        image_emb = tf.nn.xw_plus_b( video_flat, self.encode_image_W, self.encode_image_b ) # (batch_size*n_lstm_steps, dim_hidden)\n",
    "        image_emb = tf.reshape(image_emb, [self.batch_size, self.n_lstm_steps, self.dim_hidden])\n",
    "\n",
    "        state1 = tf.zeros([self.batch_size, self.lstm1.state_size])\n",
    "        state2 = tf.zeros([self.batch_size, self.lstm2.state_size])\n",
    "        padding = tf.zeros([self.batch_size, self.dim_hidden])\n",
    "        \n",
    "        probs = []\n",
    "        loss = 0.0\n",
    "        \n",
    "        ##############################  Encoding Stage ##################################\n",
    "        for i in range(0, self.n_video_lstm_step):\n",
    "            #with tf.variable_scope(\"LSTM\") as scop:\n",
    "                #with tf.variable_scope(\"LSTM1\"):\n",
    "            with tf.variable_scope('generator', reuse=tf.AUTO_REUSE) as scope:\n",
    "                if i > 0:\n",
    "                    tf.get_variable_scope().reuse_variables()\n",
    "                output1, state1 = self.lstm1(image_emb[:,i,:], state1)\n",
    "\n",
    "                #with tf.variable_scope(\"LSTM2\"):\n",
    "                output2, state2 = self.lstm2(tf.concat([padding, output1],1), state2)\n",
    "\n",
    "        ############################# Decoding Stage ######################################\n",
    "        for i in range(0, self.n_caption_lstm_step): ## Phase 2 => only generate captions\n",
    "            \n",
    "            with tf.variable_scope('generator', reuse=tf.AUTO_REUSE) as scope:\n",
    "                with tf.device(\"/cpu:0\"):\n",
    "                    current_embed = tf.nn.embedding_lookup(self.Wemb, caption[:, i])\n",
    "                    \n",
    "                output1, state1 = self.lstm1(padding, state1)\n",
    "\n",
    "            #with tf.variable_scope(\"LSTM2\"):\n",
    "                output2, state2 = self.lstm2(tf.concat([current_embed, output1],1), state2)\n",
    "\n",
    "            labels = tf.expand_dims(caption[:, i+1], 1)\n",
    "            indices = tf.expand_dims(tf.range(0, self.batch_size, 1), 1)\n",
    "            concated = tf.concat([indices, labels], 1)\n",
    "            onehot_labels = tf.sparse_to_dense(concated, tf.stack([self.batch_size, self.n_words]), 1.0, 0.0)\n",
    "            \n",
    "            logit_words = tf.nn.xw_plus_b(output2, self.embed_word_W, self.embed_word_b)\n",
    "            cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=logit_words, labels=onehot_labels)\n",
    "            cross_entropy = cross_entropy * caption_mask[:,i]\n",
    "            probs.append(logit_words)\n",
    "\n",
    "            current_loss = tf.reduce_sum(cross_entropy)/self.batch_size\n",
    "            loss = loss + current_loss\n",
    "            \n",
    "        return loss, video, video_mask, caption, caption_mask, probs\n",
    "    \n",
    "    \n",
    "    def build_generator(self):\n",
    "        video = tf.placeholder(tf.float32, [1, self.n_video_lstm_step,  self.dim_image])\n",
    "        video_mask = tf.placeholder(tf.float32, [1, self.n_video_lstm_step])\n",
    "        \n",
    "        video_flat = tf.reshape(video, [-1, self.dim_image])\n",
    "        \n",
    "        image_emb = tf.nn.xw_plus_b(video_flat, self.encode_image_W, self.encode_image_b)\n",
    "        image_emb = tf.reshape(image_emb, [1, self.n_video_lstm_step, self.dim_hidden])\n",
    "        \n",
    "        state1 = tf.zeros([1, self.lstm1.state_size])\n",
    "        state2 = tf.zeros([1, self.lstm2.state_size])\n",
    "        padding = tf.zeros([1, self.dim_hidden])\n",
    "        \n",
    "        generated_words = []\n",
    "        \n",
    "        probs = []\n",
    "        embeds = []\n",
    "        \n",
    "        for i in range(0, self.n_video_lstm_step):\n",
    "            with tf.variable_scope('generator', reuse=tf.AUTO_REUSE) as scope:\n",
    "                if i > 0:\n",
    "                    tf.get_variable_scope().reuse_variables()\n",
    "                    \n",
    "                output1, state1 = self.lstm1(image_emb[:,i,:], state1)\n",
    "\n",
    "                output2, state2 = self.lstm2(tf.concat([padding, output1],1), state2)\n",
    "                \n",
    "        for  i in range(0, self.n_caption_lstm_step):\n",
    "            tf.get_variable_scope().reuse_variables()\n",
    "            \n",
    "            with tf.variable_scope('generator', reuse=tf.AUTO_REUSE) as scope:\n",
    "                if i == 0:\n",
    "                    with tf.device('/cpu:0'):\n",
    "                        current_embed = tf.nn.embedding_lookup(self.Wemb, tf.ones([1], dtype=tf.int64))\n",
    "                        \n",
    "                output1, state1 = self.lstm1(padding, state1)\n",
    "\n",
    "                output2, state2 = self.lstm2(tf.concat([current_embed, output1], 1), state2)\n",
    "                \n",
    "                logit_words = tf.nn.xw_plus_b(output2, self.embed_word_W, self.embed_word_b)\n",
    "                max_prob_index = tf.argmax(logit_words, 1)[0]\n",
    "                generated_words.append(max_prob_index)\n",
    "                probs.append(logit_words)\n",
    "                \n",
    "                with tf.device(\"/cpu:0\"):\n",
    "                    current_embed = tf.nn.embedding_lookup(self.Wemb, max_prob_index)\n",
    "                    current_embed = tf.expand_dims(current_embed, 0)\n",
    "\n",
    "                embeds.append(current_embed)\n",
    "                \n",
    "        return video, video_mask, generated_words, probs, embeds"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "#=====================================================================================\n",
    "# Global Parameters\n",
    "#=====================================================================================\n",
    "video_path = './data/training_data/video'\n",
    "\n",
    "video_train_feat_path = './data/training_data/feat'\n",
    "video_test_feat_path = './data/testing_data/feat'\n",
    "\n",
    "video_train_data_label_path = './data/training_label.json'\n",
    "video_test_data_label_path = './data/testing_public_label.json'\n",
    "\n",
    "model_path = './models'\n",
    "\n",
    "#=======================================================================================\n",
    "# Train Parameters\n",
    "#=======================================================================================\n",
    "dim_image = 4096\n",
    "dim_hidden= 1000\n",
    "\n",
    "n_video_lstm_step = 80\n",
    "n_caption_lstm_step = 20\n",
    "n_frame_step = 80\n",
    "\n",
    "n_epochs = 1000\n",
    "batch_size = 50\n",
    "learning_rate = 0.0001\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_data(video_feat_path, video_label_path) :\n",
    "    train_data_captions = pd.read_json(video_label_path,orient='values',encoding='utf-8',lines=False)\n",
    "    \n",
    "    train_data_captions = pd.concat([pd.Series(row['id'], row['caption']) for _, row in train_data_captions.iterrows()]).reset_index()\n",
    "    train_data_captions.columns = ['caption','id']\n",
    "    train_data_captions['video_path'] = train_data_captions.apply(lambda row: row['id']+'.npy', axis=1)\n",
    "    train_data_captions['video_path'] = train_data_captions['video_path'].map(lambda x: os.path.join(video_feat_path, x))\n",
    "    train_data_captions = train_data_captions[train_data_captions['video_path'].map(lambda x: os.path.exists( x ))]\n",
    "    train_data_captions = train_data_captions[train_data_captions['caption'].map(lambda x: isinstance(x, str))]\n",
    "\n",
    "    unique_filenames = sorted(train_data_captions['video_path'].unique())\n",
    "    train_data_captions = train_data_captions[train_data_captions['video_path'].map(lambda x: x in unique_filenames)]\n",
    "    return train_data_captions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "def preProBuildWordVocab(sentence_iterator, word_count_threshold=5):\n",
    "    # borrowed this function from NeuralTalk\n",
    "    print('preprocessing word counts and creating vocab based on word count threshold %d' % (word_count_threshold))\n",
    "    word_counts = {}\n",
    "    nsents = 0\n",
    "    for sent in sentence_iterator:\n",
    "        nsents += 1\n",
    "        for w in sent.lower().split(' '):\n",
    "            word_counts[w] = word_counts.get(w, 0) + 1\n",
    "    vocab = [w for w in word_counts if word_counts[w] >= word_count_threshold]\n",
    "    print('filtered words from %d to %d' % (len(word_counts), len(vocab)))\n",
    "    \n",
    "    ixtoword = {}\n",
    "    ixtoword[0] = '<pad>'\n",
    "    ixtoword[1] = '<bos>'\n",
    "    ixtoword[2] = '<eos>'\n",
    "    ixtoword[3] = '<unk>'\n",
    "    \n",
    "    wordtoix = {}\n",
    "    wordtoix['<pad>'] = 0\n",
    "    wordtoix['<bos>'] = 1\n",
    "    wordtoix['<eos>'] = 2\n",
    "    wordtoix['<unk>'] = 3\n",
    "    \n",
    "    for idx, w in enumerate(vocab):\n",
    "        wordtoix[w] = idx+4\n",
    "        ixtoword[idx+4] = w\n",
    "\n",
    "    word_counts['<pad>'] = nsents\n",
    "    word_counts['<bos>'] = nsents\n",
    "    word_counts['<eos>'] = nsents\n",
    "    word_counts['<unk>'] = nsents\n",
    "    \n",
    "    bias_init_vector = np.array([1.0 * word_counts[ ixtoword[i] ] for i in ixtoword])\n",
    "    bias_init_vector /= np.sum(bias_init_vector) # normalize to frequencies\n",
    "    bias_init_vector = np.log(bias_init_vector)\n",
    "    bias_init_vector -= np.max(bias_init_vector) # shift to nice numeric range\n",
    "    \n",
    "    return wordtoix, ixtoword, bias_init_vector"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "def train():\n",
    "    \n",
    "    train_data = get_data(video_train_feat_path, video_train_data_label_path)\n",
    "    train_captions = train_data['caption'].values\n",
    "    test_data = get_data(video_test_feat_path, video_test_data_label_path)\n",
    "    test_captions = test_data['caption'].values\n",
    "\n",
    "    captions_list = list(train_captions) + list(test_captions)\n",
    "    captions = np.asarray(captions_list, dtype=np.object)\n",
    "\n",
    "    captions = map(lambda x: x.replace('.', ''), captions)\n",
    "    captions = map(lambda x: x.replace(',', ''), captions)\n",
    "    captions = map(lambda x: x.replace('\"', ''), captions)\n",
    "    captions = map(lambda x: x.replace('\\n', ''), captions)\n",
    "    captions = map(lambda x: x.replace('?', ''), captions)\n",
    "    captions = map(lambda x: x.replace('!', ''), captions)\n",
    "    captions = map(lambda x: x.replace('\\\\', ''), captions)\n",
    "    captions = map(lambda x: x.replace('/', ''), captions)\n",
    "\n",
    "    wordtoix, ixtoword, bias_init_vector = preProBuildWordVocab(captions, word_count_threshold=0)\n",
    "\n",
    "    np.save(\"./data/wordtoix\", wordtoix)\n",
    "    np.save('./data/ixtoword', ixtoword)\n",
    "    np.save(\"./data/bias_init_vector\", bias_init_vector)\n",
    "\n",
    "    #tf.get_variable_scope().reuse_variables()\n",
    "    model = Video_Caption_Generator(\n",
    "            dim_image=dim_image,\n",
    "            n_words=len(wordtoix),\n",
    "            dim_hidden=dim_hidden,\n",
    "            batch_size=batch_size,\n",
    "            n_lstm_steps=n_frame_step,\n",
    "            n_video_lstm_step=n_video_lstm_step,\n",
    "            n_caption_lstm_step=n_caption_lstm_step,\n",
    "            bias_init_vector=bias_init_vector)\n",
    "\n",
    "    tf_loss, tf_video, tf_video_mask, tf_caption, tf_caption_mask, tf_probs = model.build_model()\n",
    "    \n",
    "    with tf.Session() as sess:\n",
    "    \n",
    "        train_op = tf.train.AdamOptimizer(learning_rate).minimize(tf_loss)\n",
    "        coord = tf.train.Coordinator()\n",
    "        threads = tf.train.start_queue_runners(sess=sess, coord=coord)\n",
    "        init = tf.global_variables_initializer()#初始化所在的位置至关重要，以本程序为例，使用adam优化器时，会主动创建变量。\n",
    "        sess.run(init)\n",
    "\n",
    "        # my tensorflow version is 0.12.1, I write the saver with version 1.0\n",
    "        saver = tf.train.Saver(max_to_keep=100, write_version=1)\n",
    "\n",
    "        #new_saver = tf.train.Saver()\n",
    "        #new_saver = tf.train.import_meta_graph('./rgb_models/model-1000.meta')\n",
    "        #new_saver.restore(sess, tf.train.latest_checkpoint('./models/'))\n",
    "        \n",
    "        #加入断点续训功能\n",
    "        ckpt = tf.train.get_checkpoint_state(model_path)\n",
    "        if ckpt and ckpt.model_checkpoint_path:\n",
    "            saver.restore(sess,ckpt.model_checkpoint_path)\n",
    "\n",
    "        loss_fd = open('loss.txt', 'w')\n",
    "        loss_to_draw = []\n",
    "\n",
    "        for epoch in range(0, n_epochs):\n",
    "            loss_to_draw_epoch = []\n",
    "\n",
    "            index = list(train_data.index)\n",
    "            np.random.shuffle(index)\n",
    "            train_data = train_data.iloc[index]\n",
    "\n",
    "            current_train_data = train_data.groupby('video_path').apply(lambda x: x.iloc[np.random.choice(len(x))])\n",
    "            current_train_data = current_train_data.reset_index(drop=True)\n",
    "\n",
    "            for start, end in zip(\n",
    "                    range(0, len(current_train_data)+1, batch_size),\n",
    "                    range(batch_size, len(current_train_data)+1, batch_size)):\n",
    "\n",
    "                start_time = time.time()\n",
    "\n",
    "                current_batch = current_train_data[start:end]\n",
    "                current_videos = current_batch['video_path'].values\n",
    "\n",
    "                current_feats = np.zeros((batch_size, n_video_lstm_step, dim_image))\n",
    "                current_feats_vals = list(map(lambda vid: np.load(vid), current_videos))\n",
    "\n",
    "                current_video_masks = np.zeros((batch_size, n_video_lstm_step))\n",
    "\n",
    "                for ind,feat in enumerate(current_feats_vals):\n",
    "                    current_feats[ind][:len(current_feats_vals[ind])] = feat\n",
    "                    current_video_masks[ind][:len(current_feats_vals[ind])] = 1\n",
    "\n",
    "                current_captions = current_batch['caption'].values\n",
    "                current_captions = map(lambda x: '<bos> ' + x, current_captions)\n",
    "                current_captions = map(lambda x: x.replace('.', ''), current_captions)\n",
    "                current_captions = map(lambda x: x.replace(',', ''), current_captions)\n",
    "                current_captions = map(lambda x: x.replace('\"', ''), current_captions)\n",
    "                current_captions = map(lambda x: x.replace('\\n', ''), current_captions)\n",
    "                current_captions = map(lambda x: x.replace('?', ''), current_captions)\n",
    "                current_captions = map(lambda x: x.replace('!', ''), current_captions)\n",
    "                current_captions = map(lambda x: x.replace('\\\\', ''), current_captions)\n",
    "                current_captions = map(lambda x: x.replace('/', ''), current_captions)\n",
    "\n",
    "                current_captions = list(current_captions)\n",
    "\n",
    "                for idx, each_cap in enumerate(current_captions):\n",
    "                    word = each_cap.lower().split(' ')\n",
    "                    if len(word) < n_caption_lstm_step:\n",
    "                        current_captions[idx] = current_captions[idx] + ' <eos>'\n",
    "                    else:\n",
    "                        new_word = ''\n",
    "                        for i in range(n_caption_lstm_step-1):\n",
    "                            new_word = new_word + word[i] + ' '\n",
    "                        current_captions[idx] = new_word + '<eos>'\n",
    "\n",
    "                current_caption_ind = []\n",
    "                for cap in current_captions:\n",
    "                    current_word_ind = []\n",
    "                    for word in cap.lower().split(' '):\n",
    "                        if word in wordtoix:\n",
    "                            current_word_ind.append(wordtoix[word])\n",
    "                        else:\n",
    "                            current_word_ind.append(wordtoix['<unk>'])\n",
    "                    current_caption_ind.append(current_word_ind)\n",
    "\n",
    "                current_caption_matrix = sequence.pad_sequences(current_caption_ind, padding='post', maxlen=n_caption_lstm_step)\n",
    "                current_caption_matrix = np.hstack( [current_caption_matrix, np.zeros( [len(current_caption_matrix), 1] ) ] ).astype(int)\n",
    "                current_caption_masks = np.zeros( (current_caption_matrix.shape[0], current_caption_matrix.shape[1]) )\n",
    "                nonzeros = np.array( list(map(lambda x: (x != 0).sum() + 1, current_caption_matrix )) )\n",
    "\n",
    "                for ind, row in enumerate(current_caption_masks):\n",
    "                    row[:nonzeros[ind]] = 1\n",
    "\n",
    "                probs_val = sess.run(tf_probs, feed_dict={\n",
    "                    tf_video:current_feats,\n",
    "                    tf_caption: current_caption_matrix\n",
    "                    })\n",
    "\n",
    "                _, loss_val = sess.run(\n",
    "                        [train_op, tf_loss],\n",
    "                        feed_dict={\n",
    "                            tf_video: current_feats,\n",
    "                            tf_video_mask : current_video_masks,\n",
    "                            tf_caption: current_caption_matrix,\n",
    "                            tf_caption_mask: current_caption_masks\n",
    "                            })\n",
    "                loss_to_draw_epoch.append(loss_val)\n",
    "\n",
    "                print('idx: ', start, \" Epoch: \", epoch, \" loss: \", loss_val, ' Elapsed time: ', str((time.time() - start_time)))\n",
    "                loss_fd.write('epoch ' + str(epoch) + ' loss ' + str(loss_val) + '\\n')\n",
    "\n",
    "            # draw loss curve every epoch\n",
    "            loss_to_draw.append(np.mean(loss_to_draw_epoch))\n",
    "            plt_save_dir = \"./loss_imgs\"\n",
    "            plt_save_img_name = str(epoch) + '.png'\n",
    "            plt.plot(range(len(loss_to_draw)), loss_to_draw, color='g')\n",
    "            plt.grid(True)\n",
    "            plt.savefig(os.path.join(plt_save_dir, plt_save_img_name))\n",
    "\n",
    "            if np.mod(epoch, 10) == 0:\n",
    "                print (\"Epoch \", epoch, \" is done. Saving the model ...\")\n",
    "                saver.save(sess, os.path.join(model_path, 'model'), global_step=epoch)\n",
    "\n",
    "        loss_fd.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "def test(model_path='./models/model-70'):\n",
    "    \n",
    "    test_data = get_data(video_test_feat_path, video_test_data_label_path)\n",
    "    test_videos = test_data['video_path'].unique()\n",
    "    \n",
    "    ixtoword = pd.Series(np.load('./data/ixtoword.npy').tolist())\n",
    "    \n",
    "    bias_init_vector = np.load('./data/bias_init_vector.npy')\n",
    "    \n",
    "    model = Video_Caption_Generator(\n",
    "            dim_image=dim_image,\n",
    "            n_words=len(ixtoword),\n",
    "            dim_hidden=dim_hidden,\n",
    "            batch_size=batch_size,\n",
    "            n_lstm_steps=n_frame_step,\n",
    "            n_video_lstm_step=n_video_lstm_step,\n",
    "            n_caption_lstm_step=n_caption_lstm_step,\n",
    "            bias_init_vector=bias_init_vector)\n",
    "    \n",
    "    video_tf, video_mask_tf, caption_tf, probs_tf, last_embed_tf = model.build_generator()\n",
    "    \n",
    "    with tf.Session() as sess:\n",
    "        \n",
    "        saver = tf.train.Saver()\n",
    "        saver.restore(sess, model_path)\n",
    "        \n",
    "        test_output_txt_fd = open('S2VT_results.txt', 'w')\n",
    "        \n",
    "        for idx, video_feat_path in enumerate(test_videos):\n",
    "            print (idx, video_feat_path)\n",
    "            \n",
    "            video_feat = np.load(video_feat_path)[None,...]\n",
    "            #video_feat = np.load(video_feat_path)\n",
    "            #video_mask = np.ones((video_feat.shape[0], video_feat.shape[1]))\n",
    "            if video_feat.shape[1] == n_frame_step:\n",
    "                video_mask = np.ones((video_feat.shape[0], video_feat.shape[1]))\n",
    "            else:\n",
    "                continue\n",
    "                #shape_templete = np.zeros(shape=(1, n_frame_step, 4096), dtype=float )\n",
    "                #shape_templete[:video_feat.shape[0], :video_feat.shape[1], :video_feat.shape[2]] = video_feat\n",
    "                #video_feat = shape_templete\n",
    "                #video_mask = np.ones((video_feat.shape[0], n_frame_step))\n",
    "\n",
    "            generated_word_index = sess.run(caption_tf, feed_dict={video_tf:video_feat, video_mask_tf:video_mask})\n",
    "            generated_words = ixtoword[generated_word_index]\n",
    "\n",
    "            punctuation = np.argmax(np.array(generated_words) == '<eos>') + 1\n",
    "            generated_words = generated_words[:punctuation]\n",
    "\n",
    "            generated_sentence = ' '.join(generated_words)\n",
    "            generated_sentence = generated_sentence.replace('<bos> ', '')\n",
    "            generated_sentence = generated_sentence.replace(' <eos>', '')\n",
    "            print (generated_sentence,'\\n')\n",
    "            test_output_txt_fd.write(video_feat_path + '\\n')\n",
    "            test_output_txt_fd.write(generated_sentence + '\\n\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "preprocessing word counts and creating vocab based on word count threshold 0\n",
      "filtered words from 6248 to 6248\n",
      "WARNING:tensorflow:<tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell object at 0x17b24edd8>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.\n",
      "WARNING:tensorflow:<tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell object at 0x17b24ee48>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.\n",
      "INFO:tensorflow:Restoring parameters from ./models/model-40\n",
      "idx:  0  Epoch:  0  loss:  7.1822343  Elapsed time:  52.59547400474548\n",
      "idx:  50  Epoch:  0  loss:  7.574959  Elapsed time:  34.726829051971436\n",
      "idx:  100  Epoch:  0  loss:  7.220011  Elapsed time:  33.78416204452515\n",
      "idx:  150  Epoch:  0  loss:  9.711597  Elapsed time:  32.51974010467529\n",
      "idx:  200  Epoch:  0  loss:  7.5677266  Elapsed time:  33.9223108291626\n",
      "idx:  250  Epoch:  0  loss:  7.852043  Elapsed time:  32.764440059661865\n",
      "idx:  300  Epoch:  0  loss:  7.9782925  Elapsed time:  33.83790326118469\n",
      "idx:  350  Epoch:  0  loss:  8.271207  Elapsed time:  31.78542709350586\n",
      "idx:  400  Epoch:  0  loss:  9.144431  Elapsed time:  35.24722194671631\n",
      "idx:  450  Epoch:  0  loss:  8.228762  Elapsed time:  34.957348108291626\n",
      "idx:  500  Epoch:  0  loss:  8.028235  Elapsed time:  32.36221170425415\n",
      "idx:  550  Epoch:  0  loss:  7.6977277  Elapsed time:  33.99416780471802\n",
      "idx:  600  Epoch:  0  loss:  9.326417  Elapsed time:  33.86395311355591\n",
      "idx:  650  Epoch:  0  loss:  6.8778462  Elapsed time:  33.91302800178528\n",
      "idx:  700  Epoch:  0  loss:  8.232151  Elapsed time:  31.56613302230835\n",
      "idx:  750  Epoch:  0  loss:  6.238899  Elapsed time:  32.41634202003479\n",
      "idx:  800  Epoch:  0  loss:  9.57668  Elapsed time:  33.142776012420654\n",
      "idx:  850  Epoch:  0  loss:  9.425606  Elapsed time:  29.99104380607605\n",
      "idx:  900  Epoch:  0  loss:  8.954376  Elapsed time:  30.816757202148438\n",
      "idx:  950  Epoch:  0  loss:  7.139595  Elapsed time:  33.99169421195984\n",
      "idx:  1000  Epoch:  0  loss:  7.7670155  Elapsed time:  31.61675214767456\n",
      "idx:  1050  Epoch:  0  loss:  8.421747  Elapsed time:  33.2507438659668\n",
      "idx:  1100  Epoch:  0  loss:  7.041641  Elapsed time:  31.909698963165283\n",
      "idx:  1150  Epoch:  0  loss:  7.9150467  Elapsed time:  33.4943208694458\n",
      "idx:  1200  Epoch:  0  loss:  7.6523156  Elapsed time:  34.49496793746948\n",
      "idx:  1250  Epoch:  0  loss:  7.730446  Elapsed time:  35.10343408584595\n",
      "idx:  1300  Epoch:  0  loss:  7.8195653  Elapsed time:  33.34918570518494\n",
      "idx:  1350  Epoch:  0  loss:  9.104428  Elapsed time:  34.095545053482056\n",
      "idx:  1400  Epoch:  0  loss:  6.576791  Elapsed time:  33.630526304244995\n",
      "Epoch  0  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n",
      "idx:  0  Epoch:  1  loss:  7.22195  Elapsed time:  30.89232087135315\n",
      "idx:  50  Epoch:  1  loss:  6.4842143  Elapsed time:  32.92324495315552\n",
      "idx:  100  Epoch:  1  loss:  8.254671  Elapsed time:  34.89768195152283\n",
      "idx:  150  Epoch:  1  loss:  7.9774933  Elapsed time:  30.13879919052124\n",
      "idx:  200  Epoch:  1  loss:  8.562121  Elapsed time:  33.419281005859375\n",
      "idx:  250  Epoch:  1  loss:  8.504329  Elapsed time:  31.98421812057495\n",
      "idx:  300  Epoch:  1  loss:  8.961604  Elapsed time:  32.14752268791199\n",
      "idx:  350  Epoch:  1  loss:  7.1753883  Elapsed time:  31.024932861328125\n",
      "idx:  400  Epoch:  1  loss:  7.4217696  Elapsed time:  31.472331047058105\n",
      "idx:  450  Epoch:  1  loss:  9.092241  Elapsed time:  33.15091395378113\n",
      "idx:  500  Epoch:  1  loss:  7.3039804  Elapsed time:  32.64047122001648\n",
      "idx:  550  Epoch:  1  loss:  8.460717  Elapsed time:  32.04955506324768\n",
      "idx:  600  Epoch:  1  loss:  8.0072775  Elapsed time:  33.73892569541931\n",
      "idx:  650  Epoch:  1  loss:  8.656371  Elapsed time:  33.62796902656555\n",
      "idx:  700  Epoch:  1  loss:  7.8273573  Elapsed time:  33.20542120933533\n",
      "idx:  750  Epoch:  1  loss:  5.5619745  Elapsed time:  35.232409954071045\n",
      "idx:  800  Epoch:  1  loss:  8.295776  Elapsed time:  30.986037731170654\n",
      "idx:  850  Epoch:  1  loss:  9.849175  Elapsed time:  32.17286396026611\n",
      "idx:  900  Epoch:  1  loss:  6.3173723  Elapsed time:  31.846234798431396\n",
      "idx:  950  Epoch:  1  loss:  8.381932  Elapsed time:  31.030407905578613\n",
      "idx:  1000  Epoch:  1  loss:  9.009663  Elapsed time:  31.47601890563965\n",
      "idx:  1050  Epoch:  1  loss:  8.576155  Elapsed time:  33.63026690483093\n",
      "idx:  1100  Epoch:  1  loss:  7.3855686  Elapsed time:  33.82748508453369\n",
      "idx:  1150  Epoch:  1  loss:  7.921112  Elapsed time:  32.606338024139404\n",
      "idx:  1200  Epoch:  1  loss:  7.8669767  Elapsed time:  34.0490460395813\n",
      "idx:  1250  Epoch:  1  loss:  8.410782  Elapsed time:  33.6742057800293\n",
      "idx:  1300  Epoch:  1  loss:  7.510258  Elapsed time:  33.95767092704773\n",
      "idx:  1350  Epoch:  1  loss:  9.597345  Elapsed time:  33.70723795890808\n",
      "idx:  1400  Epoch:  1  loss:  7.1104927  Elapsed time:  32.965571880340576\n",
      "idx:  0  Epoch:  2  loss:  6.7101555  Elapsed time:  34.1939959526062\n",
      "idx:  50  Epoch:  2  loss:  6.9467573  Elapsed time:  32.930428981781006\n",
      "idx:  100  Epoch:  2  loss:  7.3251157  Elapsed time:  33.01633882522583\n",
      "idx:  150  Epoch:  2  loss:  9.274774  Elapsed time:  33.72625803947449\n",
      "idx:  200  Epoch:  2  loss:  7.1949263  Elapsed time:  32.79352593421936\n",
      "idx:  250  Epoch:  2  loss:  8.121436  Elapsed time:  31.777942895889282\n",
      "idx:  300  Epoch:  2  loss:  7.6892643  Elapsed time:  33.26690411567688\n",
      "idx:  350  Epoch:  2  loss:  7.8628845  Elapsed time:  31.453004121780396\n",
      "idx:  400  Epoch:  2  loss:  7.307107  Elapsed time:  34.31540274620056\n",
      "idx:  450  Epoch:  2  loss:  6.852877  Elapsed time:  34.794517040252686\n",
      "idx:  500  Epoch:  2  loss:  9.089954  Elapsed time:  32.22222113609314\n",
      "idx:  550  Epoch:  2  loss:  7.2660775  Elapsed time:  30.8641836643219\n",
      "idx:  600  Epoch:  2  loss:  8.005087  Elapsed time:  33.0629608631134\n",
      "idx:  650  Epoch:  2  loss:  7.69134  Elapsed time:  33.71587562561035\n",
      "idx:  700  Epoch:  2  loss:  7.6746573  Elapsed time:  33.115424156188965\n",
      "idx:  750  Epoch:  2  loss:  7.8731217  Elapsed time:  34.55736017227173\n",
      "idx:  800  Epoch:  2  loss:  7.690611  Elapsed time:  34.20182728767395\n",
      "idx:  850  Epoch:  2  loss:  8.444008  Elapsed time:  33.94089484214783\n",
      "idx:  900  Epoch:  2  loss:  8.318578  Elapsed time:  32.8125638961792\n",
      "idx:  950  Epoch:  2  loss:  8.829813  Elapsed time:  31.88928985595703\n",
      "idx:  1000  Epoch:  2  loss:  8.4773445  Elapsed time:  30.303699016571045\n",
      "idx:  1050  Epoch:  2  loss:  7.0167255  Elapsed time:  34.64348602294922\n",
      "idx:  1100  Epoch:  2  loss:  7.614142  Elapsed time:  31.16049838066101\n",
      "idx:  1150  Epoch:  2  loss:  7.4220366  Elapsed time:  33.98823118209839\n",
      "idx:  1200  Epoch:  2  loss:  7.2288857  Elapsed time:  31.470120906829834\n",
      "idx:  1250  Epoch:  2  loss:  7.5470533  Elapsed time:  33.48770999908447\n",
      "idx:  1300  Epoch:  2  loss:  9.05315  Elapsed time:  34.738219022750854\n",
      "idx:  1350  Epoch:  2  loss:  8.518956  Elapsed time:  33.67860293388367\n",
      "idx:  1400  Epoch:  2  loss:  7.572904  Elapsed time:  32.7714958190918\n",
      "idx:  0  Epoch:  3  loss:  6.86717  Elapsed time:  32.940831899642944\n",
      "idx:  50  Epoch:  3  loss:  7.8592854  Elapsed time:  33.32156801223755\n",
      "idx:  100  Epoch:  3  loss:  7.168067  Elapsed time:  31.65214490890503\n",
      "idx:  150  Epoch:  3  loss:  7.8542185  Elapsed time:  30.97278904914856\n",
      "idx:  200  Epoch:  3  loss:  8.733566  Elapsed time:  32.228368043899536\n",
      "idx:  250  Epoch:  3  loss:  7.4675674  Elapsed time:  31.261669874191284\n",
      "idx:  300  Epoch:  3  loss:  8.572521  Elapsed time:  32.9830379486084\n",
      "idx:  350  Epoch:  3  loss:  7.2360806  Elapsed time:  29.832478046417236\n",
      "idx:  400  Epoch:  3  loss:  6.97828  Elapsed time:  33.32627081871033\n",
      "idx:  450  Epoch:  3  loss:  7.1620684  Elapsed time:  31.95329713821411\n",
      "idx:  500  Epoch:  3  loss:  6.8216896  Elapsed time:  32.78425908088684\n",
      "idx:  550  Epoch:  3  loss:  7.2809825  Elapsed time:  31.128801822662354\n",
      "idx:  600  Epoch:  3  loss:  7.2309575  Elapsed time:  34.49560284614563\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  650  Epoch:  3  loss:  8.975519  Elapsed time:  34.351688861846924\n",
      "idx:  700  Epoch:  3  loss:  6.916613  Elapsed time:  30.739910125732422\n",
      "idx:  750  Epoch:  3  loss:  6.6218576  Elapsed time:  30.172439098358154\n",
      "idx:  800  Epoch:  3  loss:  8.558196  Elapsed time:  33.496437072753906\n",
      "idx:  850  Epoch:  3  loss:  8.727559  Elapsed time:  31.3855881690979\n",
      "idx:  900  Epoch:  3  loss:  7.2127423  Elapsed time:  30.37177300453186\n",
      "idx:  950  Epoch:  3  loss:  7.6856217  Elapsed time:  30.384530305862427\n",
      "idx:  1000  Epoch:  3  loss:  7.021962  Elapsed time:  31.286675930023193\n",
      "idx:  1050  Epoch:  3  loss:  8.890959  Elapsed time:  33.934288024902344\n",
      "idx:  1100  Epoch:  3  loss:  6.473008  Elapsed time:  30.942083835601807\n",
      "idx:  1150  Epoch:  3  loss:  7.3903465  Elapsed time:  33.84851288795471\n",
      "idx:  1200  Epoch:  3  loss:  6.7005205  Elapsed time:  29.71462106704712\n",
      "idx:  1250  Epoch:  3  loss:  8.127621  Elapsed time:  32.96289300918579\n",
      "idx:  1300  Epoch:  3  loss:  8.871499  Elapsed time:  33.07740592956543\n",
      "idx:  1350  Epoch:  3  loss:  7.131279  Elapsed time:  34.65900278091431\n",
      "idx:  1400  Epoch:  3  loss:  7.9983315  Elapsed time:  31.43604302406311\n",
      "idx:  0  Epoch:  4  loss:  10.502419  Elapsed time:  33.57876896858215\n",
      "idx:  50  Epoch:  4  loss:  6.200442  Elapsed time:  34.15770196914673\n",
      "idx:  100  Epoch:  4  loss:  7.6397247  Elapsed time:  34.25955891609192\n",
      "idx:  150  Epoch:  4  loss:  9.385903  Elapsed time:  30.486871004104614\n",
      "idx:  200  Epoch:  4  loss:  6.9239345  Elapsed time:  31.456671953201294\n",
      "idx:  250  Epoch:  4  loss:  8.266654  Elapsed time:  31.61030888557434\n",
      "idx:  300  Epoch:  4  loss:  7.5841  Elapsed time:  33.14662218093872\n",
      "idx:  350  Epoch:  4  loss:  7.483229  Elapsed time:  30.25483202934265\n",
      "idx:  400  Epoch:  4  loss:  6.81116  Elapsed time:  31.66424298286438\n",
      "idx:  450  Epoch:  4  loss:  7.5923567  Elapsed time:  31.310585021972656\n",
      "idx:  500  Epoch:  4  loss:  8.318516  Elapsed time:  31.889392137527466\n",
      "idx:  550  Epoch:  4  loss:  7.1331477  Elapsed time:  31.140119791030884\n",
      "idx:  600  Epoch:  4  loss:  8.407295  Elapsed time:  33.72172021865845\n",
      "idx:  650  Epoch:  4  loss:  6.554507  Elapsed time:  31.375308752059937\n",
      "idx:  700  Epoch:  4  loss:  6.970445  Elapsed time:  32.038331031799316\n",
      "idx:  750  Epoch:  4  loss:  6.2079773  Elapsed time:  33.859939098358154\n",
      "idx:  800  Epoch:  4  loss:  7.5060515  Elapsed time:  34.663716077804565\n",
      "idx:  850  Epoch:  4  loss:  7.356599  Elapsed time:  31.468137979507446\n",
      "idx:  900  Epoch:  4  loss:  7.323944  Elapsed time:  33.27033495903015\n",
      "idx:  950  Epoch:  4  loss:  7.190676  Elapsed time:  31.52792191505432\n",
      "idx:  1000  Epoch:  4  loss:  7.568657  Elapsed time:  33.527738094329834\n",
      "idx:  1050  Epoch:  4  loss:  7.4510026  Elapsed time:  32.42956590652466\n",
      "idx:  1100  Epoch:  4  loss:  6.5562873  Elapsed time:  30.42297101020813\n",
      "idx:  1150  Epoch:  4  loss:  7.670234  Elapsed time:  33.1435170173645\n",
      "idx:  1200  Epoch:  4  loss:  7.0976567  Elapsed time:  34.27088212966919\n",
      "idx:  1250  Epoch:  4  loss:  6.8190713  Elapsed time:  32.38821887969971\n",
      "idx:  1300  Epoch:  4  loss:  7.7715683  Elapsed time:  33.05074715614319\n",
      "idx:  1350  Epoch:  4  loss:  7.697432  Elapsed time:  32.781607151031494\n",
      "idx:  1400  Epoch:  4  loss:  6.119595  Elapsed time:  34.299535036087036\n",
      "idx:  0  Epoch:  5  loss:  8.117867  Elapsed time:  30.898621797561646\n",
      "idx:  50  Epoch:  5  loss:  6.597431  Elapsed time:  33.314521074295044\n",
      "idx:  100  Epoch:  5  loss:  7.513666  Elapsed time:  31.50462317466736\n",
      "idx:  150  Epoch:  5  loss:  7.0983  Elapsed time:  32.07701086997986\n",
      "idx:  200  Epoch:  5  loss:  8.202265  Elapsed time:  31.173130989074707\n",
      "idx:  250  Epoch:  5  loss:  7.4666247  Elapsed time:  34.058375120162964\n",
      "idx:  300  Epoch:  5  loss:  9.6793585  Elapsed time:  35.49721336364746\n",
      "idx:  350  Epoch:  5  loss:  7.8389735  Elapsed time:  32.31526231765747\n",
      "idx:  400  Epoch:  5  loss:  8.478078  Elapsed time:  31.47151207923889\n",
      "idx:  450  Epoch:  5  loss:  7.221613  Elapsed time:  31.35657501220703\n",
      "idx:  500  Epoch:  5  loss:  8.136671  Elapsed time:  32.86831784248352\n",
      "idx:  550  Epoch:  5  loss:  6.576292  Elapsed time:  31.504762887954712\n",
      "idx:  600  Epoch:  5  loss:  7.8807554  Elapsed time:  33.45093584060669\n",
      "idx:  650  Epoch:  5  loss:  8.221162  Elapsed time:  34.24679398536682\n",
      "idx:  700  Epoch:  5  loss:  6.6633377  Elapsed time:  33.472687005996704\n",
      "idx:  750  Epoch:  5  loss:  6.794691  Elapsed time:  35.443514823913574\n",
      "idx:  800  Epoch:  5  loss:  7.7689157  Elapsed time:  30.915346145629883\n",
      "idx:  850  Epoch:  5  loss:  9.370599  Elapsed time:  32.142744064331055\n",
      "idx:  900  Epoch:  5  loss:  8.164924  Elapsed time:  32.59069108963013\n",
      "idx:  950  Epoch:  5  loss:  9.235417  Elapsed time:  31.71487307548523\n",
      "idx:  1000  Epoch:  5  loss:  7.246254  Elapsed time:  30.566025972366333\n",
      "idx:  1050  Epoch:  5  loss:  8.874428  Elapsed time:  33.97122406959534\n",
      "idx:  1100  Epoch:  5  loss:  7.3180923  Elapsed time:  33.76304793357849\n",
      "idx:  1150  Epoch:  5  loss:  7.628096  Elapsed time:  30.54888606071472\n",
      "idx:  1200  Epoch:  5  loss:  6.9985538  Elapsed time:  32.7090802192688\n",
      "idx:  1250  Epoch:  5  loss:  6.267486  Elapsed time:  31.64136004447937\n",
      "idx:  1300  Epoch:  5  loss:  7.5562277  Elapsed time:  30.160759925842285\n",
      "idx:  1350  Epoch:  5  loss:  7.9923596  Elapsed time:  33.30442667007446\n",
      "idx:  1400  Epoch:  5  loss:  7.8467555  Elapsed time:  32.68605279922485\n",
      "idx:  0  Epoch:  6  loss:  8.457167  Elapsed time:  31.846636056900024\n",
      "idx:  50  Epoch:  6  loss:  6.935947  Elapsed time:  31.355720043182373\n",
      "idx:  100  Epoch:  6  loss:  6.7549224  Elapsed time:  32.00129675865173\n",
      "idx:  150  Epoch:  6  loss:  7.5514927  Elapsed time:  30.273523092269897\n",
      "idx:  200  Epoch:  6  loss:  6.8846726  Elapsed time:  32.374141216278076\n",
      "idx:  250  Epoch:  6  loss:  7.188058  Elapsed time:  29.737184047698975\n",
      "idx:  300  Epoch:  6  loss:  7.3239517  Elapsed time:  34.09603404998779\n",
      "idx:  350  Epoch:  6  loss:  7.1095896  Elapsed time:  33.90756583213806\n",
      "idx:  400  Epoch:  6  loss:  7.5008526  Elapsed time:  33.9837691783905\n",
      "idx:  450  Epoch:  6  loss:  7.4621506  Elapsed time:  31.76398205757141\n",
      "idx:  500  Epoch:  6  loss:  8.450288  Elapsed time:  32.99194097518921\n",
      "idx:  550  Epoch:  6  loss:  7.6776752  Elapsed time:  31.070987939834595\n",
      "idx:  600  Epoch:  6  loss:  6.943498  Elapsed time:  32.34703707695007\n",
      "idx:  650  Epoch:  6  loss:  7.4449344  Elapsed time:  33.86574673652649\n",
      "idx:  700  Epoch:  6  loss:  7.207015  Elapsed time:  33.85584282875061\n",
      "idx:  750  Epoch:  6  loss:  7.871009  Elapsed time:  31.87851071357727\n",
      "idx:  800  Epoch:  6  loss:  8.33866  Elapsed time:  32.6152560710907\n",
      "idx:  850  Epoch:  6  loss:  7.543478  Elapsed time:  33.258392095565796\n",
      "idx:  900  Epoch:  6  loss:  6.3444967  Elapsed time:  33.07327198982239\n",
      "idx:  950  Epoch:  6  loss:  7.06383  Elapsed time:  33.60311198234558\n",
      "idx:  1000  Epoch:  6  loss:  9.5954075  Elapsed time:  33.90155792236328\n",
      "idx:  1050  Epoch:  6  loss:  7.659428  Elapsed time:  35.69991993904114\n",
      "idx:  1100  Epoch:  6  loss:  6.8162556  Elapsed time:  33.350706815719604\n",
      "idx:  1150  Epoch:  6  loss:  7.4456673  Elapsed time:  33.082886934280396\n",
      "idx:  1200  Epoch:  6  loss:  7.114969  Elapsed time:  30.903191089630127\n",
      "idx:  1250  Epoch:  6  loss:  7.5820217  Elapsed time:  31.563050031661987\n",
      "idx:  1300  Epoch:  6  loss:  8.422421  Elapsed time:  32.71622109413147\n",
      "idx:  1350  Epoch:  6  loss:  8.465704  Elapsed time:  31.9807071685791\n",
      "idx:  1400  Epoch:  6  loss:  8.058083  Elapsed time:  30.551527976989746\n",
      "idx:  0  Epoch:  7  loss:  7.4196963  Elapsed time:  30.3698627948761\n",
      "idx:  50  Epoch:  7  loss:  8.185722  Elapsed time:  33.30259895324707\n",
      "idx:  100  Epoch:  7  loss:  8.220107  Elapsed time:  30.216333150863647\n",
      "idx:  150  Epoch:  7  loss:  6.897925  Elapsed time:  32.90864276885986\n",
      "idx:  200  Epoch:  7  loss:  7.0670547  Elapsed time:  33.54606294631958\n",
      "idx:  250  Epoch:  7  loss:  6.831476  Elapsed time:  29.951338052749634\n",
      "idx:  300  Epoch:  7  loss:  7.5129786  Elapsed time:  30.9511079788208\n",
      "idx:  350  Epoch:  7  loss:  8.1538  Elapsed time:  33.667060136795044\n",
      "idx:  400  Epoch:  7  loss:  6.8160577  Elapsed time:  30.633058786392212\n",
      "idx:  450  Epoch:  7  loss:  7.74238  Elapsed time:  31.10118293762207\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  500  Epoch:  7  loss:  7.207582  Elapsed time:  30.1325740814209\n",
      "idx:  550  Epoch:  7  loss:  8.670147  Elapsed time:  33.646416902542114\n",
      "idx:  600  Epoch:  7  loss:  8.501601  Elapsed time:  32.864098072052\n",
      "idx:  650  Epoch:  7  loss:  7.414221  Elapsed time:  31.01235604286194\n",
      "idx:  700  Epoch:  7  loss:  6.824092  Elapsed time:  32.30096387863159\n",
      "idx:  750  Epoch:  7  loss:  6.820722  Elapsed time:  31.32965588569641\n",
      "idx:  800  Epoch:  7  loss:  8.748499  Elapsed time:  32.315638065338135\n",
      "idx:  850  Epoch:  7  loss:  8.559488  Elapsed time:  32.708718061447144\n",
      "idx:  900  Epoch:  7  loss:  7.047517  Elapsed time:  30.83052897453308\n",
      "idx:  950  Epoch:  7  loss:  6.393893  Elapsed time:  33.00684905052185\n",
      "idx:  1000  Epoch:  7  loss:  7.203106  Elapsed time:  30.359230756759644\n",
      "idx:  1050  Epoch:  7  loss:  9.578203  Elapsed time:  34.28330588340759\n",
      "idx:  1100  Epoch:  7  loss:  6.70433  Elapsed time:  31.584022045135498\n",
      "idx:  1150  Epoch:  7  loss:  7.140863  Elapsed time:  31.215893030166626\n",
      "idx:  1200  Epoch:  7  loss:  7.4170322  Elapsed time:  30.082025289535522\n",
      "idx:  1250  Epoch:  7  loss:  6.2716465  Elapsed time:  31.847193956375122\n",
      "idx:  1300  Epoch:  7  loss:  7.4547315  Elapsed time:  33.48294997215271\n",
      "idx:  1350  Epoch:  7  loss:  7.5447383  Elapsed time:  32.78467583656311\n",
      "idx:  1400  Epoch:  7  loss:  6.941692  Elapsed time:  34.71323299407959\n",
      "idx:  0  Epoch:  8  loss:  8.360059  Elapsed time:  30.931761741638184\n",
      "idx:  50  Epoch:  8  loss:  7.477456  Elapsed time:  31.034111976623535\n",
      "idx:  100  Epoch:  8  loss:  8.677271  Elapsed time:  34.334978103637695\n",
      "idx:  150  Epoch:  8  loss:  7.664067  Elapsed time:  31.542031049728394\n",
      "idx:  200  Epoch:  8  loss:  7.4023814  Elapsed time:  32.60981297492981\n",
      "idx:  250  Epoch:  8  loss:  7.542238  Elapsed time:  34.5000581741333\n",
      "idx:  300  Epoch:  8  loss:  7.7511034  Elapsed time:  31.297213315963745\n",
      "idx:  350  Epoch:  8  loss:  7.8635225  Elapsed time:  31.484461069107056\n",
      "idx:  400  Epoch:  8  loss:  7.0742283  Elapsed time:  34.11480498313904\n",
      "idx:  450  Epoch:  8  loss:  9.009997  Elapsed time:  31.145073890686035\n",
      "idx:  500  Epoch:  8  loss:  6.838165  Elapsed time:  29.979549169540405\n",
      "idx:  550  Epoch:  8  loss:  7.4170084  Elapsed time:  32.23334193229675\n",
      "idx:  600  Epoch:  8  loss:  10.010729  Elapsed time:  32.6367130279541\n",
      "idx:  650  Epoch:  8  loss:  7.7764616  Elapsed time:  30.756463289260864\n",
      "idx:  700  Epoch:  8  loss:  8.251522  Elapsed time:  32.84169864654541\n",
      "idx:  750  Epoch:  8  loss:  7.032858  Elapsed time:  30.623835802078247\n",
      "idx:  800  Epoch:  8  loss:  8.234743  Elapsed time:  30.129652976989746\n",
      "idx:  850  Epoch:  8  loss:  7.912515  Elapsed time:  32.54211616516113\n",
      "idx:  900  Epoch:  8  loss:  7.873935  Elapsed time:  34.04230713844299\n",
      "idx:  950  Epoch:  8  loss:  8.230244  Elapsed time:  33.205021142959595\n",
      "idx:  1000  Epoch:  8  loss:  7.924277  Elapsed time:  32.74592995643616\n",
      "idx:  1050  Epoch:  8  loss:  7.8420057  Elapsed time:  32.317793130874634\n",
      "idx:  1100  Epoch:  8  loss:  7.856894  Elapsed time:  31.758821725845337\n",
      "idx:  1150  Epoch:  8  loss:  6.6607428  Elapsed time:  32.25338315963745\n",
      "idx:  1200  Epoch:  8  loss:  8.31918  Elapsed time:  33.77762293815613\n",
      "idx:  1250  Epoch:  8  loss:  6.207884  Elapsed time:  33.315155029296875\n",
      "idx:  1300  Epoch:  8  loss:  9.287759  Elapsed time:  33.44156312942505\n",
      "idx:  1350  Epoch:  8  loss:  6.2809367  Elapsed time:  30.82419991493225\n",
      "idx:  1400  Epoch:  8  loss:  8.888069  Elapsed time:  32.443522930145264\n",
      "idx:  0  Epoch:  9  loss:  8.644164  Elapsed time:  32.906537771224976\n",
      "idx:  50  Epoch:  9  loss:  7.759931  Elapsed time:  32.02382731437683\n",
      "idx:  100  Epoch:  9  loss:  8.846278  Elapsed time:  31.30652689933777\n",
      "idx:  150  Epoch:  9  loss:  7.30429  Elapsed time:  31.01076102256775\n",
      "idx:  200  Epoch:  9  loss:  8.185888  Elapsed time:  30.459998846054077\n",
      "idx:  250  Epoch:  9  loss:  8.73546  Elapsed time:  32.70752692222595\n",
      "idx:  300  Epoch:  9  loss:  8.051921  Elapsed time:  34.756197929382324\n",
      "idx:  350  Epoch:  9  loss:  7.163941  Elapsed time:  30.82353115081787\n",
      "idx:  400  Epoch:  9  loss:  7.6793513  Elapsed time:  32.112911224365234\n",
      "idx:  450  Epoch:  9  loss:  7.668456  Elapsed time:  33.95412802696228\n",
      "idx:  500  Epoch:  9  loss:  8.476218  Elapsed time:  31.69607186317444\n",
      "idx:  550  Epoch:  9  loss:  7.163147  Elapsed time:  31.3161039352417\n",
      "idx:  600  Epoch:  9  loss:  8.90253  Elapsed time:  31.30129909515381\n",
      "idx:  650  Epoch:  9  loss:  8.590534  Elapsed time:  30.178611993789673\n",
      "idx:  700  Epoch:  9  loss:  9.070116  Elapsed time:  32.686877965927124\n",
      "idx:  750  Epoch:  9  loss:  7.186833  Elapsed time:  30.646051168441772\n",
      "idx:  800  Epoch:  9  loss:  6.967829  Elapsed time:  31.701999187469482\n",
      "idx:  850  Epoch:  9  loss:  8.421627  Elapsed time:  31.37627387046814\n",
      "idx:  900  Epoch:  9  loss:  7.263495  Elapsed time:  31.728787183761597\n",
      "idx:  950  Epoch:  9  loss:  6.949012  Elapsed time:  32.8051061630249\n",
      "idx:  1000  Epoch:  9  loss:  8.257386  Elapsed time:  32.47267198562622\n",
      "idx:  1050  Epoch:  9  loss:  8.095394  Elapsed time:  33.61455512046814\n",
      "idx:  1100  Epoch:  9  loss:  7.15304  Elapsed time:  30.38615393638611\n",
      "idx:  1150  Epoch:  9  loss:  7.020444  Elapsed time:  31.403176069259644\n",
      "idx:  1200  Epoch:  9  loss:  8.032189  Elapsed time:  30.618415117263794\n",
      "idx:  1250  Epoch:  9  loss:  7.5565357  Elapsed time:  32.04316711425781\n",
      "idx:  1300  Epoch:  9  loss:  9.569593  Elapsed time:  31.12140703201294\n",
      "idx:  1350  Epoch:  9  loss:  9.504613  Elapsed time:  34.32829213142395\n",
      "idx:  1400  Epoch:  9  loss:  7.111871  Elapsed time:  30.357549905776978\n",
      "idx:  0  Epoch:  10  loss:  6.6312714  Elapsed time:  30.7741539478302\n",
      "idx:  50  Epoch:  10  loss:  7.222108  Elapsed time:  29.967913389205933\n",
      "idx:  100  Epoch:  10  loss:  6.913655  Elapsed time:  34.08267307281494\n",
      "idx:  150  Epoch:  10  loss:  8.140008  Elapsed time:  30.756160020828247\n",
      "idx:  200  Epoch:  10  loss:  6.920389  Elapsed time:  31.184265851974487\n",
      "idx:  250  Epoch:  10  loss:  8.25908  Elapsed time:  30.522873163223267\n",
      "idx:  300  Epoch:  10  loss:  8.497264  Elapsed time:  33.91641092300415\n",
      "idx:  350  Epoch:  10  loss:  7.2531157  Elapsed time:  33.053122758865356\n",
      "idx:  400  Epoch:  10  loss:  6.7699156  Elapsed time:  32.93539571762085\n",
      "idx:  450  Epoch:  10  loss:  8.009381  Elapsed time:  31.6843900680542\n",
      "idx:  500  Epoch:  10  loss:  9.371639  Elapsed time:  32.81626224517822\n",
      "idx:  550  Epoch:  10  loss:  6.803056  Elapsed time:  33.75388503074646\n",
      "idx:  600  Epoch:  10  loss:  7.38915  Elapsed time:  33.08075213432312\n",
      "idx:  650  Epoch:  10  loss:  7.689322  Elapsed time:  31.860235929489136\n",
      "idx:  700  Epoch:  10  loss:  7.2598476  Elapsed time:  30.627923011779785\n",
      "idx:  750  Epoch:  10  loss:  6.8609347  Elapsed time:  32.25695991516113\n",
      "idx:  800  Epoch:  10  loss:  7.247108  Elapsed time:  30.294949054718018\n",
      "idx:  850  Epoch:  10  loss:  8.337038  Elapsed time:  34.082661867141724\n",
      "idx:  900  Epoch:  10  loss:  7.157889  Elapsed time:  30.2720468044281\n",
      "idx:  950  Epoch:  10  loss:  7.620128  Elapsed time:  33.31044602394104\n",
      "idx:  1000  Epoch:  10  loss:  7.060193  Elapsed time:  31.669525861740112\n",
      "idx:  1050  Epoch:  10  loss:  7.3025684  Elapsed time:  31.361670970916748\n",
      "idx:  1100  Epoch:  10  loss:  6.4383335  Elapsed time:  31.463785886764526\n",
      "idx:  1150  Epoch:  10  loss:  8.26316  Elapsed time:  30.760953903198242\n",
      "idx:  1200  Epoch:  10  loss:  8.472369  Elapsed time:  33.9135160446167\n",
      "idx:  1250  Epoch:  10  loss:  6.9167433  Elapsed time:  30.480217933654785\n",
      "idx:  1300  Epoch:  10  loss:  9.853136  Elapsed time:  31.969388961791992\n",
      "idx:  1350  Epoch:  10  loss:  7.7264733  Elapsed time:  33.47351384162903\n",
      "idx:  1400  Epoch:  10  loss:  8.271942  Elapsed time:  31.782413005828857\n",
      "Epoch  10  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  0  Epoch:  11  loss:  7.7471995  Elapsed time:  32.008408069610596\n",
      "idx:  50  Epoch:  11  loss:  7.6586657  Elapsed time:  31.120347261428833\n",
      "idx:  100  Epoch:  11  loss:  8.3970995  Elapsed time:  31.129838705062866\n",
      "idx:  150  Epoch:  11  loss:  7.5172195  Elapsed time:  33.653038024902344\n",
      "idx:  200  Epoch:  11  loss:  7.2890296  Elapsed time:  34.43378710746765\n",
      "idx:  250  Epoch:  11  loss:  9.103787  Elapsed time:  31.912364959716797\n",
      "idx:  300  Epoch:  11  loss:  8.845978  Elapsed time:  33.246716022491455\n",
      "idx:  350  Epoch:  11  loss:  6.8557606  Elapsed time:  30.878857135772705\n",
      "idx:  400  Epoch:  11  loss:  7.0008264  Elapsed time:  31.1319797039032\n",
      "idx:  450  Epoch:  11  loss:  7.2927895  Elapsed time:  33.172422885894775\n",
      "idx:  500  Epoch:  11  loss:  7.5699086  Elapsed time:  34.41175103187561\n",
      "idx:  550  Epoch:  11  loss:  6.796979  Elapsed time:  29.942752838134766\n",
      "idx:  600  Epoch:  11  loss:  7.195347  Elapsed time:  32.37998080253601\n",
      "idx:  650  Epoch:  11  loss:  8.183231  Elapsed time:  30.659639835357666\n",
      "idx:  700  Epoch:  11  loss:  7.868714  Elapsed time:  30.476770877838135\n",
      "idx:  750  Epoch:  11  loss:  5.650863  Elapsed time:  32.0111780166626\n",
      "idx:  800  Epoch:  11  loss:  8.739137  Elapsed time:  31.224788904190063\n",
      "idx:  850  Epoch:  11  loss:  9.406198  Elapsed time:  33.78290104866028\n",
      "idx:  900  Epoch:  11  loss:  6.7604704  Elapsed time:  30.965431928634644\n",
      "idx:  950  Epoch:  11  loss:  7.209395  Elapsed time:  34.5577290058136\n",
      "idx:  1000  Epoch:  11  loss:  8.051279  Elapsed time:  33.004523038864136\n",
      "idx:  1050  Epoch:  11  loss:  6.8954926  Elapsed time:  30.677077054977417\n",
      "idx:  1100  Epoch:  11  loss:  7.9616237  Elapsed time:  32.32314395904541\n",
      "idx:  1150  Epoch:  11  loss:  6.7716255  Elapsed time:  33.5815269947052\n",
      "idx:  1200  Epoch:  11  loss:  7.6905737  Elapsed time:  31.56380605697632\n",
      "idx:  1250  Epoch:  11  loss:  7.1511464  Elapsed time:  32.57419514656067\n",
      "idx:  1300  Epoch:  11  loss:  7.5145755  Elapsed time:  32.70211696624756\n",
      "idx:  1350  Epoch:  11  loss:  7.361784  Elapsed time:  30.779433965682983\n",
      "idx:  1400  Epoch:  11  loss:  8.993928  Elapsed time:  33.230769872665405\n",
      "idx:  0  Epoch:  12  loss:  7.5460196  Elapsed time:  30.49082612991333\n",
      "idx:  50  Epoch:  12  loss:  7.990979  Elapsed time:  31.739848136901855\n",
      "idx:  100  Epoch:  12  loss:  7.3015447  Elapsed time:  31.969558715820312\n",
      "idx:  150  Epoch:  12  loss:  8.80984  Elapsed time:  30.267745971679688\n",
      "idx:  200  Epoch:  12  loss:  8.234479  Elapsed time:  32.3448281288147\n",
      "idx:  250  Epoch:  12  loss:  7.556414  Elapsed time:  30.819315195083618\n",
      "idx:  300  Epoch:  12  loss:  8.422113  Elapsed time:  30.75105595588684\n",
      "idx:  350  Epoch:  12  loss:  7.8822494  Elapsed time:  31.154115915298462\n",
      "idx:  400  Epoch:  12  loss:  6.695514  Elapsed time:  31.276578903198242\n",
      "idx:  450  Epoch:  12  loss:  7.2328486  Elapsed time:  31.9184410572052\n",
      "idx:  500  Epoch:  12  loss:  8.574758  Elapsed time:  33.204805850982666\n",
      "idx:  550  Epoch:  12  loss:  7.933477  Elapsed time:  30.87089204788208\n",
      "idx:  600  Epoch:  12  loss:  7.060579  Elapsed time:  32.68849515914917\n",
      "idx:  650  Epoch:  12  loss:  8.077398  Elapsed time:  33.21870303153992\n",
      "idx:  700  Epoch:  12  loss:  6.212947  Elapsed time:  33.875991106033325\n",
      "idx:  750  Epoch:  12  loss:  8.789601  Elapsed time:  34.849087953567505\n",
      "idx:  800  Epoch:  12  loss:  8.772965  Elapsed time:  30.245508193969727\n",
      "idx:  850  Epoch:  12  loss:  6.752615  Elapsed time:  31.433619022369385\n",
      "idx:  900  Epoch:  12  loss:  6.620216  Elapsed time:  30.46606683731079\n",
      "idx:  950  Epoch:  12  loss:  8.358111  Elapsed time:  31.31769585609436\n",
      "idx:  1000  Epoch:  12  loss:  7.326599  Elapsed time:  29.98738670349121\n",
      "idx:  1050  Epoch:  12  loss:  7.895336  Elapsed time:  33.923405170440674\n",
      "idx:  1100  Epoch:  12  loss:  6.6310835  Elapsed time:  29.98368215560913\n",
      "idx:  1150  Epoch:  12  loss:  6.8112726  Elapsed time:  30.14572811126709\n",
      "idx:  1200  Epoch:  12  loss:  6.8956733  Elapsed time:  30.505126953125\n",
      "idx:  1250  Epoch:  12  loss:  7.7340837  Elapsed time:  29.85964584350586\n",
      "idx:  1300  Epoch:  12  loss:  8.216649  Elapsed time:  31.751387119293213\n",
      "idx:  1350  Epoch:  12  loss:  8.183671  Elapsed time:  31.6872878074646\n",
      "idx:  1400  Epoch:  12  loss:  8.538759  Elapsed time:  31.154924869537354\n",
      "idx:  0  Epoch:  13  loss:  8.498982  Elapsed time:  30.477251768112183\n",
      "idx:  50  Epoch:  13  loss:  6.7035546  Elapsed time:  32.98235011100769\n",
      "idx:  100  Epoch:  13  loss:  8.731639  Elapsed time:  31.49128007888794\n",
      "idx:  150  Epoch:  13  loss:  9.019783  Elapsed time:  32.313907861709595\n",
      "idx:  200  Epoch:  13  loss:  6.9661317  Elapsed time:  32.50601291656494\n",
      "idx:  250  Epoch:  13  loss:  8.190965  Elapsed time:  33.729371070861816\n",
      "idx:  300  Epoch:  13  loss:  7.5386286  Elapsed time:  31.76534676551819\n",
      "idx:  350  Epoch:  13  loss:  6.702841  Elapsed time:  30.828635931015015\n",
      "idx:  400  Epoch:  13  loss:  7.417718  Elapsed time:  32.39577913284302\n",
      "idx:  450  Epoch:  13  loss:  8.028052  Elapsed time:  33.87740683555603\n",
      "idx:  500  Epoch:  13  loss:  7.3742957  Elapsed time:  33.12957406044006\n",
      "idx:  550  Epoch:  13  loss:  8.119647  Elapsed time:  34.10248804092407\n",
      "idx:  600  Epoch:  13  loss:  8.99304  Elapsed time:  32.55483102798462\n",
      "idx:  650  Epoch:  13  loss:  7.9186926  Elapsed time:  30.69963788986206\n",
      "idx:  700  Epoch:  13  loss:  8.643374  Elapsed time:  32.23200798034668\n",
      "idx:  750  Epoch:  13  loss:  7.9127355  Elapsed time:  32.926782846450806\n",
      "idx:  800  Epoch:  13  loss:  7.446002  Elapsed time:  35.314926862716675\n",
      "idx:  850  Epoch:  13  loss:  8.09726  Elapsed time:  33.98244094848633\n",
      "idx:  900  Epoch:  13  loss:  6.511977  Elapsed time:  30.29006004333496\n",
      "idx:  950  Epoch:  13  loss:  7.387483  Elapsed time:  30.65222191810608\n",
      "idx:  1000  Epoch:  13  loss:  7.3806643  Elapsed time:  30.514737129211426\n",
      "idx:  1050  Epoch:  13  loss:  8.430306  Elapsed time:  34.22731399536133\n",
      "idx:  1100  Epoch:  13  loss:  7.4748716  Elapsed time:  33.50393891334534\n",
      "idx:  1150  Epoch:  13  loss:  8.321284  Elapsed time:  34.752350091934204\n",
      "idx:  1200  Epoch:  13  loss:  6.8075056  Elapsed time:  30.928066968917847\n",
      "idx:  1250  Epoch:  13  loss:  7.4236073  Elapsed time:  30.2989661693573\n",
      "idx:  1300  Epoch:  13  loss:  6.3482194  Elapsed time:  29.56090998649597\n",
      "idx:  1350  Epoch:  13  loss:  7.1757784  Elapsed time:  33.09223175048828\n",
      "idx:  1400  Epoch:  13  loss:  7.255796  Elapsed time:  30.838096141815186\n",
      "idx:  0  Epoch:  14  loss:  6.235379  Elapsed time:  31.184340000152588\n",
      "idx:  50  Epoch:  14  loss:  8.005193  Elapsed time:  30.147095203399658\n",
      "idx:  100  Epoch:  14  loss:  8.37894  Elapsed time:  32.68999004364014\n",
      "idx:  150  Epoch:  14  loss:  8.147001  Elapsed time:  32.52669882774353\n",
      "idx:  200  Epoch:  14  loss:  7.111108  Elapsed time:  33.420982122421265\n",
      "idx:  250  Epoch:  14  loss:  7.2566395  Elapsed time:  31.98969316482544\n",
      "idx:  300  Epoch:  14  loss:  9.157016  Elapsed time:  31.394044876098633\n",
      "idx:  350  Epoch:  14  loss:  6.8083515  Elapsed time:  33.423733949661255\n",
      "idx:  400  Epoch:  14  loss:  7.421172  Elapsed time:  34.38699126243591\n",
      "idx:  450  Epoch:  14  loss:  7.0372276  Elapsed time:  34.5705087184906\n",
      "idx:  500  Epoch:  14  loss:  7.694274  Elapsed time:  31.42399525642395\n",
      "idx:  550  Epoch:  14  loss:  6.6550207  Elapsed time:  33.696977853775024\n",
      "idx:  600  Epoch:  14  loss:  8.254049  Elapsed time:  29.856455087661743\n",
      "idx:  650  Epoch:  14  loss:  7.4554777  Elapsed time:  31.73808002471924\n",
      "idx:  700  Epoch:  14  loss:  6.8880157  Elapsed time:  33.59670400619507\n",
      "idx:  750  Epoch:  14  loss:  6.768746  Elapsed time:  30.693212270736694\n",
      "idx:  800  Epoch:  14  loss:  7.2899694  Elapsed time:  32.83957386016846\n",
      "idx:  850  Epoch:  14  loss:  9.187669  Elapsed time:  32.93684911727905\n",
      "idx:  900  Epoch:  14  loss:  6.3054543  Elapsed time:  33.61999011039734\n",
      "idx:  950  Epoch:  14  loss:  7.9656196  Elapsed time:  34.76067018508911\n",
      "idx:  1000  Epoch:  14  loss:  7.2712317  Elapsed time:  33.043824195861816\n",
      "idx:  1050  Epoch:  14  loss:  7.2960043  Elapsed time:  32.37991499900818\n",
      "idx:  1100  Epoch:  14  loss:  7.5825324  Elapsed time:  31.59240221977234\n",
      "idx:  1150  Epoch:  14  loss:  6.6269474  Elapsed time:  34.46350884437561\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  1200  Epoch:  14  loss:  6.679107  Elapsed time:  34.36536002159119\n",
      "idx:  1250  Epoch:  14  loss:  7.0071044  Elapsed time:  34.00171232223511\n",
      "idx:  1300  Epoch:  14  loss:  9.381673  Elapsed time:  32.23774695396423\n",
      "idx:  1350  Epoch:  14  loss:  8.064628  Elapsed time:  33.87096571922302\n",
      "idx:  1400  Epoch:  14  loss:  7.1509275  Elapsed time:  30.9001202583313\n",
      "idx:  0  Epoch:  15  loss:  7.660335  Elapsed time:  32.477020025253296\n",
      "idx:  50  Epoch:  15  loss:  6.7647347  Elapsed time:  30.564335107803345\n",
      "idx:  100  Epoch:  15  loss:  7.708552  Elapsed time:  32.51543593406677\n",
      "idx:  150  Epoch:  15  loss:  8.009706  Elapsed time:  32.91438102722168\n",
      "idx:  200  Epoch:  15  loss:  8.114998  Elapsed time:  32.089268922805786\n",
      "idx:  250  Epoch:  15  loss:  8.062027  Elapsed time:  32.3061089515686\n",
      "idx:  300  Epoch:  15  loss:  7.2986617  Elapsed time:  30.26489806175232\n",
      "idx:  350  Epoch:  15  loss:  8.45309  Elapsed time:  31.440994024276733\n",
      "idx:  400  Epoch:  15  loss:  7.7345805  Elapsed time:  31.030906915664673\n",
      "idx:  450  Epoch:  15  loss:  8.136142  Elapsed time:  30.77425479888916\n",
      "idx:  500  Epoch:  15  loss:  7.959293  Elapsed time:  31.50825309753418\n",
      "idx:  550  Epoch:  15  loss:  7.6740055  Elapsed time:  33.37758994102478\n",
      "idx:  600  Epoch:  15  loss:  6.694756  Elapsed time:  30.60772204399109\n",
      "idx:  650  Epoch:  15  loss:  6.7925267  Elapsed time:  32.49392890930176\n",
      "idx:  700  Epoch:  15  loss:  6.751032  Elapsed time:  32.704652070999146\n",
      "idx:  750  Epoch:  15  loss:  5.73138  Elapsed time:  31.013248920440674\n",
      "idx:  800  Epoch:  15  loss:  7.999666  Elapsed time:  32.22441792488098\n",
      "idx:  850  Epoch:  15  loss:  9.038932  Elapsed time:  31.191391944885254\n",
      "idx:  900  Epoch:  15  loss:  7.004862  Elapsed time:  34.160179138183594\n",
      "idx:  950  Epoch:  15  loss:  8.8344  Elapsed time:  30.922509908676147\n",
      "idx:  1000  Epoch:  15  loss:  7.9198494  Elapsed time:  32.55868697166443\n",
      "idx:  1050  Epoch:  15  loss:  7.9460616  Elapsed time:  33.13825821876526\n",
      "idx:  1100  Epoch:  15  loss:  6.713901  Elapsed time:  30.669142723083496\n",
      "idx:  1150  Epoch:  15  loss:  7.856953  Elapsed time:  31.221293210983276\n",
      "idx:  1200  Epoch:  15  loss:  6.815101  Elapsed time:  33.13339114189148\n",
      "idx:  1250  Epoch:  15  loss:  9.43268  Elapsed time:  33.3003671169281\n",
      "idx:  1300  Epoch:  15  loss:  7.616957  Elapsed time:  33.209951877593994\n",
      "idx:  1350  Epoch:  15  loss:  6.3004622  Elapsed time:  31.6491277217865\n",
      "idx:  1400  Epoch:  15  loss:  6.6807218  Elapsed time:  33.36950206756592\n",
      "idx:  0  Epoch:  16  loss:  6.679855  Elapsed time:  30.59799313545227\n",
      "idx:  50  Epoch:  16  loss:  7.0777073  Elapsed time:  30.108030796051025\n",
      "idx:  100  Epoch:  16  loss:  7.5210567  Elapsed time:  33.01327991485596\n",
      "idx:  150  Epoch:  16  loss:  7.8332143  Elapsed time:  33.451101303100586\n",
      "idx:  200  Epoch:  16  loss:  8.381817  Elapsed time:  32.810115814208984\n",
      "idx:  250  Epoch:  16  loss:  7.133603  Elapsed time:  30.49203586578369\n",
      "idx:  300  Epoch:  16  loss:  7.7722807  Elapsed time:  32.352442026138306\n",
      "idx:  350  Epoch:  16  loss:  7.465094  Elapsed time:  31.372420072555542\n",
      "idx:  400  Epoch:  16  loss:  6.2083874  Elapsed time:  31.191046953201294\n",
      "idx:  450  Epoch:  16  loss:  7.2762365  Elapsed time:  30.71477484703064\n",
      "idx:  500  Epoch:  16  loss:  7.6862283  Elapsed time:  30.380259037017822\n",
      "idx:  550  Epoch:  16  loss:  7.039685  Elapsed time:  32.40603423118591\n",
      "idx:  600  Epoch:  16  loss:  6.791971  Elapsed time:  31.045071840286255\n",
      "idx:  650  Epoch:  16  loss:  6.4119654  Elapsed time:  30.59540319442749\n",
      "idx:  700  Epoch:  16  loss:  7.6921372  Elapsed time:  31.34764313697815\n",
      "idx:  750  Epoch:  16  loss:  6.525475  Elapsed time:  34.3237738609314\n",
      "idx:  800  Epoch:  16  loss:  6.5320206  Elapsed time:  35.95080804824829\n",
      "idx:  850  Epoch:  16  loss:  7.9601517  Elapsed time:  31.912004947662354\n",
      "idx:  900  Epoch:  16  loss:  7.431431  Elapsed time:  35.2660768032074\n",
      "idx:  950  Epoch:  16  loss:  7.926323  Elapsed time:  30.81826114654541\n",
      "idx:  1000  Epoch:  16  loss:  6.951322  Elapsed time:  31.9882550239563\n",
      "idx:  1050  Epoch:  16  loss:  7.2898035  Elapsed time:  29.697643995285034\n",
      "idx:  1100  Epoch:  16  loss:  6.7242017  Elapsed time:  32.11423587799072\n",
      "idx:  1150  Epoch:  16  loss:  7.805552  Elapsed time:  33.85669207572937\n",
      "idx:  1200  Epoch:  16  loss:  6.8102617  Elapsed time:  33.358185052871704\n",
      "idx:  1250  Epoch:  16  loss:  6.944141  Elapsed time:  30.70150876045227\n",
      "idx:  1300  Epoch:  16  loss:  8.689165  Elapsed time:  31.649024724960327\n",
      "idx:  1350  Epoch:  16  loss:  8.248175  Elapsed time:  34.45831513404846\n",
      "idx:  1400  Epoch:  16  loss:  7.5877614  Elapsed time:  32.70909118652344\n",
      "idx:  0  Epoch:  17  loss:  8.394512  Elapsed time:  30.983960151672363\n",
      "idx:  50  Epoch:  17  loss:  6.5940185  Elapsed time:  30.610074996948242\n",
      "idx:  100  Epoch:  17  loss:  8.506846  Elapsed time:  31.441887855529785\n",
      "idx:  150  Epoch:  17  loss:  7.3503733  Elapsed time:  33.60752320289612\n",
      "idx:  200  Epoch:  17  loss:  7.993817  Elapsed time:  33.862197160720825\n",
      "idx:  250  Epoch:  17  loss:  7.2235103  Elapsed time:  30.51121711730957\n",
      "idx:  300  Epoch:  17  loss:  7.1296177  Elapsed time:  30.974310159683228\n",
      "idx:  350  Epoch:  17  loss:  7.1106253  Elapsed time:  32.735877990722656\n",
      "idx:  400  Epoch:  17  loss:  8.693311  Elapsed time:  33.41683793067932\n",
      "idx:  450  Epoch:  17  loss:  7.0800133  Elapsed time:  33.69312500953674\n",
      "idx:  500  Epoch:  17  loss:  7.5161805  Elapsed time:  32.21393394470215\n",
      "idx:  550  Epoch:  17  loss:  6.805684  Elapsed time:  31.88197612762451\n",
      "idx:  600  Epoch:  17  loss:  7.985858  Elapsed time:  31.691091060638428\n",
      "idx:  650  Epoch:  17  loss:  6.479478  Elapsed time:  32.240408182144165\n",
      "idx:  700  Epoch:  17  loss:  8.379307  Elapsed time:  31.43005609512329\n",
      "idx:  750  Epoch:  17  loss:  7.3771377  Elapsed time:  32.23851799964905\n",
      "idx:  800  Epoch:  17  loss:  6.6030993  Elapsed time:  34.28406310081482\n",
      "idx:  850  Epoch:  17  loss:  6.840303  Elapsed time:  32.95307803153992\n",
      "idx:  900  Epoch:  17  loss:  7.5189376  Elapsed time:  31.016573190689087\n",
      "idx:  950  Epoch:  17  loss:  6.054015  Elapsed time:  33.23300886154175\n",
      "idx:  1000  Epoch:  17  loss:  8.236267  Elapsed time:  34.604650020599365\n",
      "idx:  1050  Epoch:  17  loss:  8.263756  Elapsed time:  31.711663246154785\n",
      "idx:  1100  Epoch:  17  loss:  7.0580144  Elapsed time:  30.3796067237854\n",
      "idx:  1150  Epoch:  17  loss:  7.3391285  Elapsed time:  30.50739097595215\n",
      "idx:  1200  Epoch:  17  loss:  7.8089986  Elapsed time:  32.740805864334106\n",
      "idx:  1250  Epoch:  17  loss:  8.364892  Elapsed time:  31.258270978927612\n",
      "idx:  1300  Epoch:  17  loss:  7.4866014  Elapsed time:  33.14408779144287\n",
      "idx:  1350  Epoch:  17  loss:  6.929824  Elapsed time:  32.34593415260315\n",
      "idx:  1400  Epoch:  17  loss:  8.084121  Elapsed time:  34.25128483772278\n",
      "idx:  0  Epoch:  18  loss:  7.763724  Elapsed time:  30.95576786994934\n",
      "idx:  50  Epoch:  18  loss:  6.3602896  Elapsed time:  32.846412897109985\n",
      "idx:  100  Epoch:  18  loss:  8.021868  Elapsed time:  30.98572087287903\n",
      "idx:  150  Epoch:  18  loss:  6.7822475  Elapsed time:  32.14689302444458\n",
      "idx:  200  Epoch:  18  loss:  6.911093  Elapsed time:  29.86827278137207\n",
      "idx:  250  Epoch:  18  loss:  7.6056747  Elapsed time:  30.339025735855103\n",
      "idx:  300  Epoch:  18  loss:  6.9066987  Elapsed time:  34.82376503944397\n",
      "idx:  350  Epoch:  18  loss:  7.466051  Elapsed time:  30.500447273254395\n",
      "idx:  400  Epoch:  18  loss:  7.3781414  Elapsed time:  32.791796922683716\n",
      "idx:  450  Epoch:  18  loss:  6.803272  Elapsed time:  29.951886892318726\n",
      "idx:  500  Epoch:  18  loss:  7.802219  Elapsed time:  31.974060773849487\n",
      "idx:  550  Epoch:  18  loss:  6.4508095  Elapsed time:  32.26018500328064\n",
      "idx:  600  Epoch:  18  loss:  7.3159213  Elapsed time:  33.92099404335022\n",
      "idx:  650  Epoch:  18  loss:  7.7160845  Elapsed time:  33.23552227020264\n",
      "idx:  700  Epoch:  18  loss:  7.0815167  Elapsed time:  35.267606019973755\n",
      "idx:  750  Epoch:  18  loss:  8.179035  Elapsed time:  30.433430671691895\n",
      "idx:  800  Epoch:  18  loss:  7.04415  Elapsed time:  32.96113920211792\n",
      "idx:  850  Epoch:  18  loss:  7.8076587  Elapsed time:  30.51909303665161\n",
      "idx:  900  Epoch:  18  loss:  7.286786  Elapsed time:  32.36690092086792\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  950  Epoch:  18  loss:  6.9447002  Elapsed time:  33.464012145996094\n",
      "idx:  1000  Epoch:  18  loss:  7.686181  Elapsed time:  33.910857915878296\n",
      "idx:  1050  Epoch:  18  loss:  8.553793  Elapsed time:  33.942583084106445\n",
      "idx:  1100  Epoch:  18  loss:  6.6203265  Elapsed time:  30.793764114379883\n",
      "idx:  1150  Epoch:  18  loss:  6.4376335  Elapsed time:  33.96365284919739\n",
      "idx:  1200  Epoch:  18  loss:  6.923964  Elapsed time:  33.69456505775452\n",
      "idx:  1250  Epoch:  18  loss:  7.429233  Elapsed time:  31.324567079544067\n",
      "idx:  1300  Epoch:  18  loss:  7.7298183  Elapsed time:  31.15085220336914\n",
      "idx:  1350  Epoch:  18  loss:  7.7373877  Elapsed time:  33.10217905044556\n",
      "idx:  1400  Epoch:  18  loss:  7.4545774  Elapsed time:  34.653257846832275\n",
      "idx:  0  Epoch:  19  loss:  7.5163713  Elapsed time:  31.735219955444336\n",
      "idx:  50  Epoch:  19  loss:  7.04613  Elapsed time:  31.544394969940186\n",
      "idx:  100  Epoch:  19  loss:  7.585515  Elapsed time:  33.125625133514404\n",
      "idx:  150  Epoch:  19  loss:  8.632265  Elapsed time:  32.73644018173218\n",
      "idx:  200  Epoch:  19  loss:  7.300845  Elapsed time:  33.60420203208923\n",
      "idx:  250  Epoch:  19  loss:  8.554898  Elapsed time:  29.929816246032715\n",
      "idx:  300  Epoch:  19  loss:  8.616472  Elapsed time:  32.44109082221985\n",
      "idx:  350  Epoch:  19  loss:  7.159789  Elapsed time:  34.53916692733765\n",
      "idx:  400  Epoch:  19  loss:  7.673282  Elapsed time:  35.161383867263794\n",
      "idx:  450  Epoch:  19  loss:  6.7246857  Elapsed time:  33.37973666191101\n",
      "idx:  500  Epoch:  19  loss:  8.113462  Elapsed time:  32.749993085861206\n",
      "idx:  550  Epoch:  19  loss:  6.4342413  Elapsed time:  31.508259057998657\n",
      "idx:  600  Epoch:  19  loss:  7.1515884  Elapsed time:  31.424825191497803\n",
      "idx:  650  Epoch:  19  loss:  8.130999  Elapsed time:  32.157583236694336\n",
      "idx:  700  Epoch:  19  loss:  7.649368  Elapsed time:  34.286810874938965\n",
      "idx:  750  Epoch:  19  loss:  6.4194646  Elapsed time:  31.503621816635132\n",
      "idx:  800  Epoch:  19  loss:  7.227198  Elapsed time:  32.088299036026\n",
      "idx:  850  Epoch:  19  loss:  7.154837  Elapsed time:  31.457308053970337\n",
      "idx:  900  Epoch:  19  loss:  6.6457896  Elapsed time:  31.276430130004883\n",
      "idx:  950  Epoch:  19  loss:  6.244858  Elapsed time:  30.326092004776\n",
      "idx:  1000  Epoch:  19  loss:  6.858534  Elapsed time:  31.51107883453369\n",
      "idx:  1050  Epoch:  19  loss:  6.9540696  Elapsed time:  31.419924020767212\n",
      "idx:  1100  Epoch:  19  loss:  6.7123604  Elapsed time:  31.95072293281555\n",
      "idx:  1150  Epoch:  19  loss:  9.100821  Elapsed time:  33.13326811790466\n",
      "idx:  1200  Epoch:  19  loss:  7.2517724  Elapsed time:  31.874212980270386\n",
      "idx:  1250  Epoch:  19  loss:  7.3861256  Elapsed time:  32.512574911117554\n",
      "idx:  1300  Epoch:  19  loss:  7.6122146  Elapsed time:  29.65424394607544\n",
      "idx:  1350  Epoch:  19  loss:  7.052259  Elapsed time:  30.929699897766113\n",
      "idx:  1400  Epoch:  19  loss:  5.8078012  Elapsed time:  32.52513790130615\n",
      "idx:  0  Epoch:  20  loss:  6.2058516  Elapsed time:  30.969151973724365\n",
      "idx:  50  Epoch:  20  loss:  7.7194033  Elapsed time:  31.61055302619934\n",
      "idx:  100  Epoch:  20  loss:  7.473578  Elapsed time:  30.819578886032104\n",
      "idx:  150  Epoch:  20  loss:  7.9838166  Elapsed time:  32.42845392227173\n",
      "idx:  200  Epoch:  20  loss:  6.9706774  Elapsed time:  31.227248907089233\n",
      "idx:  250  Epoch:  20  loss:  7.3708034  Elapsed time:  32.95017600059509\n",
      "idx:  300  Epoch:  20  loss:  7.9176245  Elapsed time:  30.754762887954712\n",
      "idx:  350  Epoch:  20  loss:  6.8088064  Elapsed time:  30.98548984527588\n",
      "idx:  400  Epoch:  20  loss:  6.3006573  Elapsed time:  32.17594504356384\n",
      "idx:  450  Epoch:  20  loss:  8.358571  Elapsed time:  29.92950201034546\n",
      "idx:  500  Epoch:  20  loss:  8.37693  Elapsed time:  31.705348014831543\n",
      "idx:  550  Epoch:  20  loss:  7.6979976  Elapsed time:  29.999233961105347\n",
      "idx:  600  Epoch:  20  loss:  7.4630957  Elapsed time:  32.578537940979004\n",
      "idx:  650  Epoch:  20  loss:  7.2891617  Elapsed time:  30.22816300392151\n",
      "idx:  700  Epoch:  20  loss:  7.3822603  Elapsed time:  29.859352111816406\n",
      "idx:  750  Epoch:  20  loss:  7.425694  Elapsed time:  30.71838879585266\n",
      "idx:  800  Epoch:  20  loss:  8.351355  Elapsed time:  30.70038414001465\n",
      "idx:  850  Epoch:  20  loss:  7.157  Elapsed time:  29.403178930282593\n",
      "idx:  900  Epoch:  20  loss:  6.9961405  Elapsed time:  30.371479034423828\n",
      "idx:  950  Epoch:  20  loss:  8.784057  Elapsed time:  30.678011894226074\n",
      "idx:  1000  Epoch:  20  loss:  6.3363285  Elapsed time:  33.0786452293396\n",
      "idx:  1050  Epoch:  20  loss:  7.3740683  Elapsed time:  30.004162073135376\n",
      "idx:  1100  Epoch:  20  loss:  7.6027136  Elapsed time:  30.87354278564453\n",
      "idx:  1150  Epoch:  20  loss:  5.894301  Elapsed time:  31.870808124542236\n",
      "idx:  1200  Epoch:  20  loss:  7.9920807  Elapsed time:  32.77570605278015\n",
      "idx:  1250  Epoch:  20  loss:  6.9350863  Elapsed time:  29.57054901123047\n",
      "idx:  1300  Epoch:  20  loss:  7.8286266  Elapsed time:  30.372599124908447\n",
      "idx:  1350  Epoch:  20  loss:  7.387885  Elapsed time:  31.061113119125366\n",
      "idx:  1400  Epoch:  20  loss:  6.6701856  Elapsed time:  30.820167064666748\n",
      "Epoch  20  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n",
      "idx:  0  Epoch:  21  loss:  6.5737286  Elapsed time:  31.987602949142456\n",
      "idx:  50  Epoch:  21  loss:  6.816125  Elapsed time:  31.531409978866577\n",
      "idx:  100  Epoch:  21  loss:  8.730268  Elapsed time:  31.240219116210938\n",
      "idx:  150  Epoch:  21  loss:  7.9100094  Elapsed time:  29.82052707672119\n",
      "idx:  200  Epoch:  21  loss:  7.105229  Elapsed time:  31.092512845993042\n",
      "idx:  250  Epoch:  21  loss:  7.420123  Elapsed time:  31.62557888031006\n",
      "idx:  300  Epoch:  21  loss:  8.163883  Elapsed time:  33.21573567390442\n",
      "idx:  350  Epoch:  21  loss:  7.8937473  Elapsed time:  29.738960027694702\n",
      "idx:  400  Epoch:  21  loss:  8.21312  Elapsed time:  30.79950213432312\n",
      "idx:  450  Epoch:  21  loss:  7.016171  Elapsed time:  30.768759727478027\n",
      "idx:  500  Epoch:  21  loss:  7.652371  Elapsed time:  32.16588497161865\n",
      "idx:  550  Epoch:  21  loss:  7.563188  Elapsed time:  30.306917190551758\n",
      "idx:  600  Epoch:  21  loss:  7.989685  Elapsed time:  30.18065905570984\n",
      "idx:  650  Epoch:  21  loss:  6.690994  Elapsed time:  30.359084844589233\n",
      "idx:  700  Epoch:  21  loss:  6.950695  Elapsed time:  30.166848182678223\n",
      "idx:  750  Epoch:  21  loss:  6.87963  Elapsed time:  31.52317523956299\n",
      "idx:  800  Epoch:  21  loss:  7.378469  Elapsed time:  31.889670848846436\n",
      "idx:  850  Epoch:  21  loss:  8.648203  Elapsed time:  33.36452507972717\n",
      "idx:  900  Epoch:  21  loss:  7.278191  Elapsed time:  33.201658725738525\n",
      "idx:  950  Epoch:  21  loss:  8.20219  Elapsed time:  33.561980962753296\n",
      "idx:  1000  Epoch:  21  loss:  7.326528  Elapsed time:  31.082852840423584\n",
      "idx:  1050  Epoch:  21  loss:  6.7457128  Elapsed time:  32.58339500427246\n",
      "idx:  1100  Epoch:  21  loss:  6.771256  Elapsed time:  30.075040102005005\n",
      "idx:  1150  Epoch:  21  loss:  8.595455  Elapsed time:  30.28383994102478\n",
      "idx:  1200  Epoch:  21  loss:  8.263956  Elapsed time:  33.48656606674194\n",
      "idx:  1250  Epoch:  21  loss:  7.080944  Elapsed time:  30.003358840942383\n",
      "idx:  1300  Epoch:  21  loss:  6.78525  Elapsed time:  31.461604118347168\n",
      "idx:  1350  Epoch:  21  loss:  7.4522886  Elapsed time:  31.349937200546265\n",
      "idx:  1400  Epoch:  21  loss:  8.445722  Elapsed time:  29.22159695625305\n",
      "idx:  0  Epoch:  22  loss:  7.498563  Elapsed time:  30.11934208869934\n",
      "idx:  50  Epoch:  22  loss:  6.864346  Elapsed time:  32.301713943481445\n",
      "idx:  100  Epoch:  22  loss:  6.6695757  Elapsed time:  31.442386150360107\n",
      "idx:  150  Epoch:  22  loss:  8.115319  Elapsed time:  33.449896812438965\n",
      "idx:  200  Epoch:  22  loss:  8.706095  Elapsed time:  31.13650608062744\n",
      "idx:  250  Epoch:  22  loss:  7.1371408  Elapsed time:  29.429723024368286\n",
      "idx:  300  Epoch:  22  loss:  8.223814  Elapsed time:  30.150893688201904\n",
      "idx:  350  Epoch:  22  loss:  7.268394  Elapsed time:  33.33421087265015\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  400  Epoch:  22  loss:  7.5990534  Elapsed time:  31.685203313827515\n",
      "idx:  450  Epoch:  22  loss:  6.946617  Elapsed time:  30.319593906402588\n",
      "idx:  500  Epoch:  22  loss:  8.646877  Elapsed time:  30.569660902023315\n",
      "idx:  550  Epoch:  22  loss:  8.070743  Elapsed time:  31.359747648239136\n",
      "idx:  600  Epoch:  22  loss:  9.241554  Elapsed time:  31.20979928970337\n",
      "idx:  650  Epoch:  22  loss:  7.0707364  Elapsed time:  32.30641722679138\n",
      "idx:  700  Epoch:  22  loss:  8.697308  Elapsed time:  30.776237726211548\n",
      "idx:  750  Epoch:  22  loss:  5.96469  Elapsed time:  34.068639039993286\n",
      "idx:  800  Epoch:  22  loss:  6.4633403  Elapsed time:  30.47490692138672\n",
      "idx:  850  Epoch:  22  loss:  7.4818206  Elapsed time:  33.79642295837402\n",
      "idx:  900  Epoch:  22  loss:  7.157665  Elapsed time:  33.012816190719604\n",
      "idx:  950  Epoch:  22  loss:  7.352772  Elapsed time:  30.676756858825684\n",
      "idx:  1000  Epoch:  22  loss:  6.526046  Elapsed time:  30.622395992279053\n",
      "idx:  1050  Epoch:  22  loss:  7.126605  Elapsed time:  32.40030789375305\n",
      "idx:  1100  Epoch:  22  loss:  6.5847583  Elapsed time:  31.446551084518433\n",
      "idx:  1150  Epoch:  22  loss:  6.5495453  Elapsed time:  29.563331127166748\n",
      "idx:  1200  Epoch:  22  loss:  7.589083  Elapsed time:  33.252827167510986\n",
      "idx:  1250  Epoch:  22  loss:  6.9758244  Elapsed time:  31.188677310943604\n",
      "idx:  1300  Epoch:  22  loss:  7.6300583  Elapsed time:  32.53018283843994\n",
      "idx:  1350  Epoch:  22  loss:  8.618449  Elapsed time:  32.20466732978821\n",
      "idx:  1400  Epoch:  22  loss:  6.1721916  Elapsed time:  29.944835901260376\n",
      "idx:  0  Epoch:  23  loss:  7.432887  Elapsed time:  30.960335731506348\n",
      "idx:  50  Epoch:  23  loss:  9.518382  Elapsed time:  30.91054892539978\n",
      "idx:  100  Epoch:  23  loss:  7.6119156  Elapsed time:  33.01154613494873\n",
      "idx:  150  Epoch:  23  loss:  6.8893647  Elapsed time:  29.77344799041748\n",
      "idx:  200  Epoch:  23  loss:  6.525189  Elapsed time:  29.893367052078247\n",
      "idx:  250  Epoch:  23  loss:  7.2450113  Elapsed time:  31.562084674835205\n",
      "idx:  300  Epoch:  23  loss:  7.627084  Elapsed time:  30.57248306274414\n",
      "idx:  350  Epoch:  23  loss:  8.422651  Elapsed time:  32.18959593772888\n",
      "idx:  400  Epoch:  23  loss:  8.218494  Elapsed time:  33.81243371963501\n",
      "idx:  450  Epoch:  23  loss:  7.6018286  Elapsed time:  32.201518297195435\n",
      "idx:  500  Epoch:  23  loss:  7.1197166  Elapsed time:  30.36552906036377\n",
      "idx:  550  Epoch:  23  loss:  7.265194  Elapsed time:  30.729698181152344\n",
      "idx:  600  Epoch:  23  loss:  6.9520326  Elapsed time:  30.497864961624146\n",
      "idx:  650  Epoch:  23  loss:  6.7169695  Elapsed time:  31.641340970993042\n",
      "idx:  700  Epoch:  23  loss:  7.610892  Elapsed time:  31.970614910125732\n",
      "idx:  750  Epoch:  23  loss:  7.098929  Elapsed time:  33.472054958343506\n",
      "idx:  800  Epoch:  23  loss:  8.202266  Elapsed time:  31.182034969329834\n",
      "idx:  850  Epoch:  23  loss:  8.219579  Elapsed time:  31.104774951934814\n",
      "idx:  900  Epoch:  23  loss:  7.464669  Elapsed time:  30.895159006118774\n",
      "idx:  950  Epoch:  23  loss:  8.887735  Elapsed time:  30.724987983703613\n",
      "idx:  1000  Epoch:  23  loss:  7.7070255  Elapsed time:  33.61983823776245\n",
      "idx:  1050  Epoch:  23  loss:  7.4520125  Elapsed time:  31.07146692276001\n",
      "idx:  1100  Epoch:  23  loss:  7.4494834  Elapsed time:  32.95153522491455\n",
      "idx:  1150  Epoch:  23  loss:  6.074447  Elapsed time:  32.26863193511963\n",
      "idx:  1200  Epoch:  23  loss:  7.908749  Elapsed time:  33.773985147476196\n",
      "idx:  1250  Epoch:  23  loss:  7.3069625  Elapsed time:  30.126402854919434\n",
      "idx:  1300  Epoch:  23  loss:  7.662201  Elapsed time:  33.06520891189575\n",
      "idx:  1350  Epoch:  23  loss:  6.379892  Elapsed time:  30.676093101501465\n",
      "idx:  1400  Epoch:  23  loss:  7.960115  Elapsed time:  33.062439918518066\n",
      "idx:  0  Epoch:  24  loss:  8.0965185  Elapsed time:  32.44429111480713\n",
      "idx:  50  Epoch:  24  loss:  6.3349338  Elapsed time:  31.843642950057983\n",
      "idx:  100  Epoch:  24  loss:  8.274693  Elapsed time:  32.98799395561218\n",
      "idx:  150  Epoch:  24  loss:  7.0212135  Elapsed time:  31.43164896965027\n",
      "idx:  200  Epoch:  24  loss:  6.4169865  Elapsed time:  29.809452056884766\n",
      "idx:  250  Epoch:  24  loss:  7.407568  Elapsed time:  31.58314800262451\n",
      "idx:  300  Epoch:  24  loss:  6.801531  Elapsed time:  31.27411675453186\n",
      "idx:  350  Epoch:  24  loss:  5.7741423  Elapsed time:  32.00665497779846\n",
      "idx:  400  Epoch:  24  loss:  7.5319057  Elapsed time:  34.18045997619629\n",
      "idx:  450  Epoch:  24  loss:  8.441736  Elapsed time:  33.73856496810913\n",
      "idx:  500  Epoch:  24  loss:  8.008639  Elapsed time:  33.605173110961914\n",
      "idx:  550  Epoch:  24  loss:  7.6234155  Elapsed time:  30.86161994934082\n",
      "idx:  600  Epoch:  24  loss:  7.0398426  Elapsed time:  31.989806175231934\n",
      "idx:  650  Epoch:  24  loss:  7.1692505  Elapsed time:  34.123132944107056\n",
      "idx:  700  Epoch:  24  loss:  7.622717  Elapsed time:  31.2101309299469\n",
      "idx:  750  Epoch:  24  loss:  7.382243  Elapsed time:  32.79415988922119\n",
      "idx:  800  Epoch:  24  loss:  7.6598005  Elapsed time:  31.355278968811035\n",
      "idx:  850  Epoch:  24  loss:  7.1818485  Elapsed time:  34.52633595466614\n",
      "idx:  900  Epoch:  24  loss:  6.7293634  Elapsed time:  30.79175090789795\n",
      "idx:  950  Epoch:  24  loss:  7.290082  Elapsed time:  34.897079944610596\n",
      "idx:  1000  Epoch:  24  loss:  6.6578603  Elapsed time:  33.68164300918579\n",
      "idx:  1050  Epoch:  24  loss:  7.478652  Elapsed time:  32.14577317237854\n",
      "idx:  1100  Epoch:  24  loss:  7.611746  Elapsed time:  33.84706997871399\n",
      "idx:  1150  Epoch:  24  loss:  8.593805  Elapsed time:  32.665462017059326\n",
      "idx:  1200  Epoch:  24  loss:  8.222079  Elapsed time:  35.165038108825684\n",
      "idx:  1250  Epoch:  24  loss:  7.5332847  Elapsed time:  33.9341299533844\n",
      "idx:  1300  Epoch:  24  loss:  6.378937  Elapsed time:  30.99069094657898\n",
      "idx:  1350  Epoch:  24  loss:  6.643674  Elapsed time:  31.671629190444946\n",
      "idx:  1400  Epoch:  24  loss:  7.275038  Elapsed time:  31.215548992156982\n",
      "idx:  0  Epoch:  25  loss:  6.867178  Elapsed time:  32.056153297424316\n",
      "idx:  50  Epoch:  25  loss:  8.610931  Elapsed time:  32.11784100532532\n",
      "idx:  100  Epoch:  25  loss:  7.032175  Elapsed time:  34.54611921310425\n",
      "idx:  150  Epoch:  25  loss:  7.7613306  Elapsed time:  32.21366906166077\n",
      "idx:  200  Epoch:  25  loss:  7.816499  Elapsed time:  31.465030908584595\n",
      "idx:  250  Epoch:  25  loss:  7.167671  Elapsed time:  32.88957190513611\n",
      "idx:  300  Epoch:  25  loss:  9.056385  Elapsed time:  33.1873779296875\n",
      "idx:  350  Epoch:  25  loss:  7.0963054  Elapsed time:  31.03717303276062\n",
      "idx:  400  Epoch:  25  loss:  6.820694  Elapsed time:  31.851562023162842\n",
      "idx:  450  Epoch:  25  loss:  7.2572355  Elapsed time:  32.43710899353027\n",
      "idx:  500  Epoch:  25  loss:  6.946269  Elapsed time:  31.115386962890625\n",
      "idx:  550  Epoch:  25  loss:  7.119561  Elapsed time:  34.48351502418518\n",
      "idx:  600  Epoch:  25  loss:  7.2130322  Elapsed time:  34.27579426765442\n",
      "idx:  650  Epoch:  25  loss:  6.3941126  Elapsed time:  30.852348804473877\n",
      "idx:  700  Epoch:  25  loss:  6.9558835  Elapsed time:  31.894410133361816\n",
      "idx:  750  Epoch:  25  loss:  6.797338  Elapsed time:  33.030295610427856\n",
      "idx:  800  Epoch:  25  loss:  7.896133  Elapsed time:  30.45443606376648\n",
      "idx:  850  Epoch:  25  loss:  7.241526  Elapsed time:  30.80126166343689\n",
      "idx:  900  Epoch:  25  loss:  6.22764  Elapsed time:  33.84882211685181\n",
      "idx:  950  Epoch:  25  loss:  7.013939  Elapsed time:  31.031924962997437\n",
      "idx:  1000  Epoch:  25  loss:  6.9183583  Elapsed time:  33.60487174987793\n",
      "idx:  1050  Epoch:  25  loss:  7.909485  Elapsed time:  33.30041289329529\n",
      "idx:  1100  Epoch:  25  loss:  7.0232253  Elapsed time:  31.594138860702515\n",
      "idx:  1150  Epoch:  25  loss:  8.198782  Elapsed time:  34.09023475646973\n",
      "idx:  1200  Epoch:  25  loss:  8.005075  Elapsed time:  32.86195087432861\n",
      "idx:  1250  Epoch:  25  loss:  7.132413  Elapsed time:  32.80043697357178\n",
      "idx:  1300  Epoch:  25  loss:  8.2099  Elapsed time:  31.970330953598022\n",
      "idx:  1350  Epoch:  25  loss:  7.54174  Elapsed time:  31.073386907577515\n",
      "idx:  1400  Epoch:  25  loss:  5.710531  Elapsed time:  32.83347702026367\n",
      "idx:  0  Epoch:  26  loss:  7.6130157  Elapsed time:  30.75079107284546\n",
      "idx:  50  Epoch:  26  loss:  7.5532565  Elapsed time:  30.861083984375\n",
      "idx:  100  Epoch:  26  loss:  7.8250637  Elapsed time:  33.23925709724426\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  150  Epoch:  26  loss:  8.53339  Elapsed time:  31.22018814086914\n",
      "idx:  200  Epoch:  26  loss:  8.181883  Elapsed time:  31.271936893463135\n",
      "idx:  250  Epoch:  26  loss:  6.7111373  Elapsed time:  30.409875869750977\n",
      "idx:  300  Epoch:  26  loss:  7.8640676  Elapsed time:  31.50172472000122\n",
      "idx:  350  Epoch:  26  loss:  7.1391516  Elapsed time:  34.76497483253479\n",
      "idx:  400  Epoch:  26  loss:  7.110788  Elapsed time:  32.57852005958557\n",
      "idx:  450  Epoch:  26  loss:  7.5992246  Elapsed time:  31.12383222579956\n",
      "idx:  500  Epoch:  26  loss:  7.290251  Elapsed time:  30.528772830963135\n",
      "idx:  550  Epoch:  26  loss:  7.168387  Elapsed time:  33.149543046951294\n",
      "idx:  600  Epoch:  26  loss:  6.3864098  Elapsed time:  30.38488221168518\n",
      "idx:  650  Epoch:  26  loss:  6.294554  Elapsed time:  32.09540677070618\n",
      "idx:  700  Epoch:  26  loss:  6.505466  Elapsed time:  34.329522132873535\n",
      "idx:  750  Epoch:  26  loss:  5.7856126  Elapsed time:  32.45860505104065\n",
      "idx:  800  Epoch:  26  loss:  7.1504602  Elapsed time:  31.059044122695923\n",
      "idx:  850  Epoch:  26  loss:  8.902058  Elapsed time:  33.366175174713135\n",
      "idx:  900  Epoch:  26  loss:  7.2390747  Elapsed time:  33.758241176605225\n",
      "idx:  950  Epoch:  26  loss:  7.8775015  Elapsed time:  31.297975063323975\n",
      "idx:  1000  Epoch:  26  loss:  7.673909  Elapsed time:  33.0354950428009\n",
      "idx:  1050  Epoch:  26  loss:  8.328407  Elapsed time:  33.79438829421997\n",
      "idx:  1100  Epoch:  26  loss:  6.6359243  Elapsed time:  32.53922724723816\n",
      "idx:  1150  Epoch:  26  loss:  8.276286  Elapsed time:  31.608144998550415\n",
      "idx:  1200  Epoch:  26  loss:  7.424824  Elapsed time:  31.21419072151184\n",
      "idx:  1250  Epoch:  26  loss:  8.173974  Elapsed time:  31.569645166397095\n",
      "idx:  1300  Epoch:  26  loss:  7.2451115  Elapsed time:  33.88662099838257\n",
      "idx:  1350  Epoch:  26  loss:  7.6755233  Elapsed time:  33.774940967559814\n",
      "idx:  1400  Epoch:  26  loss:  7.2918777  Elapsed time:  32.157288789749146\n",
      "idx:  0  Epoch:  27  loss:  6.5579896  Elapsed time:  32.02708196640015\n",
      "idx:  50  Epoch:  27  loss:  6.291101  Elapsed time:  32.97121214866638\n",
      "idx:  100  Epoch:  27  loss:  6.808648  Elapsed time:  31.30067014694214\n",
      "idx:  150  Epoch:  27  loss:  8.490226  Elapsed time:  33.120988845825195\n",
      "idx:  200  Epoch:  27  loss:  6.6244254  Elapsed time:  34.54404282569885\n",
      "idx:  250  Epoch:  27  loss:  7.949242  Elapsed time:  32.929858922958374\n",
      "idx:  300  Epoch:  27  loss:  8.271243  Elapsed time:  31.413544178009033\n",
      "idx:  350  Epoch:  27  loss:  6.431972  Elapsed time:  31.957343101501465\n",
      "idx:  400  Epoch:  27  loss:  6.557985  Elapsed time:  30.532219171524048\n",
      "idx:  450  Epoch:  27  loss:  7.0389147  Elapsed time:  33.05217003822327\n",
      "idx:  500  Epoch:  27  loss:  7.7184577  Elapsed time:  33.625799894332886\n",
      "idx:  550  Epoch:  27  loss:  7.240211  Elapsed time:  34.5237250328064\n",
      "idx:  600  Epoch:  27  loss:  8.101464  Elapsed time:  31.333837032318115\n",
      "idx:  650  Epoch:  27  loss:  6.6435237  Elapsed time:  31.494874954223633\n",
      "idx:  700  Epoch:  27  loss:  7.1628537  Elapsed time:  34.038023948669434\n",
      "idx:  750  Epoch:  27  loss:  7.5583296  Elapsed time:  35.250224113464355\n",
      "idx:  800  Epoch:  27  loss:  7.3598337  Elapsed time:  31.945481061935425\n",
      "idx:  850  Epoch:  27  loss:  8.541831  Elapsed time:  32.460644006729126\n",
      "idx:  900  Epoch:  27  loss:  5.4776907  Elapsed time:  32.87348699569702\n",
      "idx:  950  Epoch:  27  loss:  7.478917  Elapsed time:  33.78633689880371\n",
      "idx:  1000  Epoch:  27  loss:  8.238491  Elapsed time:  33.45892095565796\n",
      "idx:  1050  Epoch:  27  loss:  6.8074865  Elapsed time:  34.00889706611633\n",
      "idx:  1100  Epoch:  27  loss:  6.3607054  Elapsed time:  33.378721714019775\n",
      "idx:  1150  Epoch:  27  loss:  7.362148  Elapsed time:  33.0496129989624\n",
      "idx:  1200  Epoch:  27  loss:  7.7847548  Elapsed time:  32.10197401046753\n",
      "idx:  1250  Epoch:  27  loss:  6.4807234  Elapsed time:  31.435725927352905\n",
      "idx:  1300  Epoch:  27  loss:  8.620663  Elapsed time:  31.891510009765625\n",
      "idx:  1350  Epoch:  27  loss:  6.895086  Elapsed time:  34.0978741645813\n",
      "idx:  1400  Epoch:  27  loss:  8.417304  Elapsed time:  30.873758792877197\n",
      "idx:  0  Epoch:  28  loss:  7.3388586  Elapsed time:  31.39075803756714\n",
      "idx:  50  Epoch:  28  loss:  8.287848  Elapsed time:  30.606218814849854\n",
      "idx:  100  Epoch:  28  loss:  7.8710117  Elapsed time:  32.70248198509216\n",
      "idx:  150  Epoch:  28  loss:  7.915636  Elapsed time:  31.260350227355957\n",
      "idx:  200  Epoch:  28  loss:  7.6214075  Elapsed time:  30.099409818649292\n",
      "idx:  250  Epoch:  28  loss:  6.4951334  Elapsed time:  33.270236015319824\n",
      "idx:  300  Epoch:  28  loss:  7.463978  Elapsed time:  31.052927017211914\n",
      "idx:  350  Epoch:  28  loss:  6.8234034  Elapsed time:  32.42717003822327\n",
      "idx:  400  Epoch:  28  loss:  7.4292846  Elapsed time:  34.30105924606323\n",
      "idx:  450  Epoch:  28  loss:  7.460136  Elapsed time:  33.31383204460144\n",
      "idx:  500  Epoch:  28  loss:  7.4318557  Elapsed time:  33.93171787261963\n",
      "idx:  550  Epoch:  28  loss:  5.5196075  Elapsed time:  32.798458099365234\n",
      "idx:  600  Epoch:  28  loss:  7.4396234  Elapsed time:  32.187469244003296\n",
      "idx:  650  Epoch:  28  loss:  6.924295  Elapsed time:  33.18433713912964\n",
      "idx:  700  Epoch:  28  loss:  7.3682404  Elapsed time:  31.42602014541626\n",
      "idx:  750  Epoch:  28  loss:  6.328077  Elapsed time:  33.1361358165741\n",
      "idx:  800  Epoch:  28  loss:  6.375786  Elapsed time:  29.49409818649292\n",
      "idx:  850  Epoch:  28  loss:  7.8128767  Elapsed time:  30.80305504798889\n",
      "idx:  900  Epoch:  28  loss:  7.4647164  Elapsed time:  30.17746114730835\n",
      "idx:  950  Epoch:  28  loss:  7.345282  Elapsed time:  33.46979308128357\n",
      "idx:  1000  Epoch:  28  loss:  6.882483  Elapsed time:  31.72208833694458\n",
      "idx:  1050  Epoch:  28  loss:  7.0255027  Elapsed time:  32.146806955337524\n",
      "idx:  1100  Epoch:  28  loss:  6.95735  Elapsed time:  32.2642879486084\n",
      "idx:  1150  Epoch:  28  loss:  6.5429387  Elapsed time:  33.003350019454956\n",
      "idx:  1200  Epoch:  28  loss:  6.656576  Elapsed time:  31.55580186843872\n",
      "idx:  1250  Epoch:  28  loss:  6.7192464  Elapsed time:  32.96447801589966\n",
      "idx:  1300  Epoch:  28  loss:  6.676055  Elapsed time:  32.05501985549927\n",
      "idx:  1350  Epoch:  28  loss:  7.1152554  Elapsed time:  30.763484001159668\n",
      "idx:  1400  Epoch:  28  loss:  6.7670975  Elapsed time:  31.223417043685913\n",
      "idx:  0  Epoch:  29  loss:  7.7393923  Elapsed time:  32.818644762039185\n",
      "idx:  50  Epoch:  29  loss:  6.3311844  Elapsed time:  31.895164966583252\n",
      "idx:  100  Epoch:  29  loss:  8.179552  Elapsed time:  30.800082206726074\n",
      "idx:  150  Epoch:  29  loss:  7.9465537  Elapsed time:  29.757189989089966\n",
      "idx:  200  Epoch:  29  loss:  8.059167  Elapsed time:  32.166261196136475\n",
      "idx:  250  Epoch:  29  loss:  7.56659  Elapsed time:  31.591172218322754\n",
      "idx:  300  Epoch:  29  loss:  6.75159  Elapsed time:  34.31486392021179\n",
      "idx:  350  Epoch:  29  loss:  8.096196  Elapsed time:  32.823320150375366\n",
      "idx:  400  Epoch:  29  loss:  6.7715054  Elapsed time:  30.85012698173523\n",
      "idx:  450  Epoch:  29  loss:  8.019368  Elapsed time:  34.06820201873779\n",
      "idx:  500  Epoch:  29  loss:  8.144856  Elapsed time:  31.098618745803833\n",
      "idx:  550  Epoch:  29  loss:  6.108105  Elapsed time:  31.30024790763855\n",
      "idx:  600  Epoch:  29  loss:  6.7481966  Elapsed time:  32.135507106781006\n",
      "idx:  650  Epoch:  29  loss:  7.065711  Elapsed time:  33.29369115829468\n",
      "idx:  700  Epoch:  29  loss:  8.090566  Elapsed time:  32.132331132888794\n",
      "idx:  750  Epoch:  29  loss:  6.1181946  Elapsed time:  32.77137804031372\n",
      "idx:  800  Epoch:  29  loss:  7.404596  Elapsed time:  30.7448148727417\n",
      "idx:  850  Epoch:  29  loss:  8.191723  Elapsed time:  32.9918098449707\n",
      "idx:  900  Epoch:  29  loss:  6.8520937  Elapsed time:  31.5938720703125\n",
      "idx:  950  Epoch:  29  loss:  6.1246  Elapsed time:  31.248095989227295\n",
      "idx:  1000  Epoch:  29  loss:  7.230814  Elapsed time:  33.2228729724884\n",
      "idx:  1050  Epoch:  29  loss:  6.9899006  Elapsed time:  32.741178035736084\n",
      "idx:  1100  Epoch:  29  loss:  7.058119  Elapsed time:  33.61064600944519\n",
      "idx:  1150  Epoch:  29  loss:  6.3252516  Elapsed time:  33.40728187561035\n",
      "idx:  1200  Epoch:  29  loss:  7.530695  Elapsed time:  32.05798292160034\n",
      "idx:  1250  Epoch:  29  loss:  6.9255776  Elapsed time:  32.374680042266846\n",
      "idx:  1300  Epoch:  29  loss:  8.148615  Elapsed time:  32.213475704193115\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  1350  Epoch:  29  loss:  7.9155593  Elapsed time:  33.21609711647034\n",
      "idx:  1400  Epoch:  29  loss:  7.3329844  Elapsed time:  33.603830099105835\n",
      "idx:  0  Epoch:  30  loss:  6.827377  Elapsed time:  31.346051931381226\n",
      "idx:  50  Epoch:  30  loss:  8.563107  Elapsed time:  30.435919761657715\n",
      "idx:  100  Epoch:  30  loss:  6.8419623  Elapsed time:  31.78278088569641\n",
      "idx:  150  Epoch:  30  loss:  8.693716  Elapsed time:  33.78078317642212\n",
      "idx:  200  Epoch:  30  loss:  8.078719  Elapsed time:  29.797932863235474\n",
      "idx:  250  Epoch:  30  loss:  7.2320943  Elapsed time:  30.05919599533081\n",
      "idx:  300  Epoch:  30  loss:  8.083773  Elapsed time:  34.67992806434631\n",
      "idx:  350  Epoch:  30  loss:  7.135626  Elapsed time:  32.91603398323059\n",
      "idx:  400  Epoch:  30  loss:  7.157203  Elapsed time:  33.80247092247009\n",
      "idx:  450  Epoch:  30  loss:  7.465534  Elapsed time:  32.195523738861084\n",
      "idx:  500  Epoch:  30  loss:  7.194622  Elapsed time:  32.5435528755188\n",
      "idx:  550  Epoch:  30  loss:  7.133412  Elapsed time:  32.7977409362793\n",
      "idx:  600  Epoch:  30  loss:  7.0294785  Elapsed time:  30.266427993774414\n",
      "idx:  650  Epoch:  30  loss:  6.5801716  Elapsed time:  34.49715209007263\n",
      "idx:  700  Epoch:  30  loss:  6.492436  Elapsed time:  31.887861967086792\n",
      "idx:  750  Epoch:  30  loss:  6.897611  Elapsed time:  30.223453760147095\n",
      "idx:  800  Epoch:  30  loss:  7.6216083  Elapsed time:  33.92958688735962\n",
      "idx:  850  Epoch:  30  loss:  8.401171  Elapsed time:  34.463398933410645\n",
      "idx:  900  Epoch:  30  loss:  7.552168  Elapsed time:  30.724013090133667\n",
      "idx:  950  Epoch:  30  loss:  7.3427014  Elapsed time:  33.834057331085205\n",
      "idx:  1000  Epoch:  30  loss:  6.75404  Elapsed time:  32.999377727508545\n",
      "idx:  1050  Epoch:  30  loss:  8.640698  Elapsed time:  31.392831087112427\n",
      "idx:  1100  Epoch:  30  loss:  6.5105777  Elapsed time:  30.939234972000122\n",
      "idx:  1150  Epoch:  30  loss:  7.9521265  Elapsed time:  32.88857316970825\n",
      "idx:  1200  Epoch:  30  loss:  7.0006523  Elapsed time:  32.880167961120605\n",
      "idx:  1250  Epoch:  30  loss:  7.526477  Elapsed time:  32.275989055633545\n",
      "idx:  1300  Epoch:  30  loss:  6.7883105  Elapsed time:  31.599440097808838\n",
      "idx:  1350  Epoch:  30  loss:  8.265431  Elapsed time:  32.95172619819641\n",
      "idx:  1400  Epoch:  30  loss:  8.311436  Elapsed time:  33.30502796173096\n",
      "Epoch  30  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n",
      "idx:  0  Epoch:  31  loss:  7.36352  Elapsed time:  34.00807976722717\n",
      "idx:  50  Epoch:  31  loss:  7.175249  Elapsed time:  33.446574211120605\n",
      "idx:  100  Epoch:  31  loss:  6.7584467  Elapsed time:  34.70900201797485\n",
      "idx:  150  Epoch:  31  loss:  7.3321686  Elapsed time:  30.27278733253479\n",
      "idx:  200  Epoch:  31  loss:  6.798634  Elapsed time:  30.787424087524414\n",
      "idx:  250  Epoch:  31  loss:  7.9152946  Elapsed time:  34.479467153549194\n",
      "idx:  300  Epoch:  31  loss:  9.422251  Elapsed time:  34.30665612220764\n",
      "idx:  350  Epoch:  31  loss:  6.4530063  Elapsed time:  31.212505102157593\n",
      "idx:  400  Epoch:  31  loss:  6.505591  Elapsed time:  31.10312008857727\n",
      "idx:  450  Epoch:  31  loss:  8.047862  Elapsed time:  31.132907152175903\n",
      "idx:  500  Epoch:  31  loss:  7.4187636  Elapsed time:  33.36439561843872\n",
      "idx:  550  Epoch:  31  loss:  5.4930706  Elapsed time:  31.9894859790802\n",
      "idx:  600  Epoch:  31  loss:  7.436948  Elapsed time:  34.02712607383728\n",
      "idx:  650  Epoch:  31  loss:  6.205106  Elapsed time:  33.295727014541626\n",
      "idx:  700  Epoch:  31  loss:  6.5395713  Elapsed time:  32.47492599487305\n",
      "idx:  750  Epoch:  31  loss:  6.4695625  Elapsed time:  30.488839149475098\n",
      "idx:  800  Epoch:  31  loss:  7.8050723  Elapsed time:  35.870795011520386\n",
      "idx:  850  Epoch:  31  loss:  6.769376  Elapsed time:  33.949010133743286\n",
      "idx:  900  Epoch:  31  loss:  7.4971757  Elapsed time:  33.03453016281128\n",
      "idx:  950  Epoch:  31  loss:  6.949066  Elapsed time:  33.58580303192139\n",
      "idx:  1000  Epoch:  31  loss:  6.8733006  Elapsed time:  29.93086314201355\n",
      "idx:  1050  Epoch:  31  loss:  7.797813  Elapsed time:  31.417069911956787\n",
      "idx:  1100  Epoch:  31  loss:  6.147013  Elapsed time:  32.96848511695862\n",
      "idx:  1150  Epoch:  31  loss:  6.819585  Elapsed time:  31.683398723602295\n",
      "idx:  1200  Epoch:  31  loss:  7.3951116  Elapsed time:  33.82347011566162\n",
      "idx:  1250  Epoch:  31  loss:  6.815073  Elapsed time:  32.184919118881226\n",
      "idx:  1300  Epoch:  31  loss:  8.11988  Elapsed time:  32.672171115875244\n",
      "idx:  1350  Epoch:  31  loss:  7.5972247  Elapsed time:  32.74627614021301\n",
      "idx:  1400  Epoch:  31  loss:  6.7893133  Elapsed time:  31.92462468147278\n",
      "idx:  0  Epoch:  32  loss:  7.4562654  Elapsed time:  31.085275888442993\n",
      "idx:  50  Epoch:  32  loss:  6.139387  Elapsed time:  32.39828181266785\n",
      "idx:  100  Epoch:  32  loss:  8.174766  Elapsed time:  32.89483594894409\n",
      "idx:  150  Epoch:  32  loss:  7.0752  Elapsed time:  34.43535017967224\n",
      "idx:  200  Epoch:  32  loss:  6.9133306  Elapsed time:  32.05724573135376\n",
      "idx:  250  Epoch:  32  loss:  6.5857286  Elapsed time:  33.25275421142578\n",
      "idx:  300  Epoch:  32  loss:  6.792668  Elapsed time:  32.30154323577881\n",
      "idx:  350  Epoch:  32  loss:  7.284315  Elapsed time:  31.610520124435425\n",
      "idx:  400  Epoch:  32  loss:  7.559374  Elapsed time:  30.60305404663086\n",
      "idx:  450  Epoch:  32  loss:  7.166283  Elapsed time:  31.761716842651367\n",
      "idx:  500  Epoch:  32  loss:  6.408854  Elapsed time:  33.69887018203735\n",
      "idx:  550  Epoch:  32  loss:  6.29453  Elapsed time:  29.72168278694153\n",
      "idx:  600  Epoch:  32  loss:  7.485499  Elapsed time:  32.15066194534302\n",
      "idx:  650  Epoch:  32  loss:  7.398382  Elapsed time:  31.625738620758057\n",
      "idx:  700  Epoch:  32  loss:  7.08423  Elapsed time:  33.24482202529907\n",
      "idx:  750  Epoch:  32  loss:  5.232091  Elapsed time:  31.047760009765625\n",
      "idx:  800  Epoch:  32  loss:  8.0197115  Elapsed time:  29.977923154830933\n",
      "idx:  850  Epoch:  32  loss:  7.58219  Elapsed time:  34.9573540687561\n",
      "idx:  900  Epoch:  32  loss:  7.785166  Elapsed time:  32.08507680892944\n",
      "idx:  950  Epoch:  32  loss:  7.3968315  Elapsed time:  31.658995866775513\n",
      "idx:  1000  Epoch:  32  loss:  7.9308047  Elapsed time:  30.590178728103638\n",
      "idx:  1050  Epoch:  32  loss:  6.652162  Elapsed time:  30.787153005599976\n",
      "idx:  1100  Epoch:  32  loss:  7.6380873  Elapsed time:  33.39653134346008\n",
      "idx:  1150  Epoch:  32  loss:  8.0973015  Elapsed time:  33.33665490150452\n",
      "idx:  1200  Epoch:  32  loss:  6.9547153  Elapsed time:  33.3651556968689\n",
      "idx:  1250  Epoch:  32  loss:  8.177424  Elapsed time:  31.268418073654175\n",
      "idx:  1300  Epoch:  32  loss:  8.308292  Elapsed time:  32.49272799491882\n",
      "idx:  1350  Epoch:  32  loss:  7.9355555  Elapsed time:  32.04998707771301\n",
      "idx:  1400  Epoch:  32  loss:  7.8442225  Elapsed time:  30.784268856048584\n",
      "idx:  0  Epoch:  33  loss:  7.7142105  Elapsed time:  32.30637788772583\n",
      "idx:  50  Epoch:  33  loss:  6.256287  Elapsed time:  32.32814407348633\n",
      "idx:  100  Epoch:  33  loss:  6.9682546  Elapsed time:  33.25655698776245\n",
      "idx:  150  Epoch:  33  loss:  7.3997936  Elapsed time:  32.857282876968384\n",
      "idx:  200  Epoch:  33  loss:  7.140063  Elapsed time:  33.70030879974365\n",
      "idx:  250  Epoch:  33  loss:  7.1146545  Elapsed time:  36.986427783966064\n",
      "idx:  300  Epoch:  33  loss:  6.2882986  Elapsed time:  33.635361671447754\n",
      "idx:  350  Epoch:  33  loss:  6.235695  Elapsed time:  31.67300796508789\n",
      "idx:  400  Epoch:  33  loss:  6.7292013  Elapsed time:  31.327916860580444\n",
      "idx:  450  Epoch:  33  loss:  5.8235846  Elapsed time:  32.323225259780884\n",
      "idx:  500  Epoch:  33  loss:  7.2025146  Elapsed time:  32.32035565376282\n",
      "idx:  550  Epoch:  33  loss:  7.439644  Elapsed time:  31.93053388595581\n",
      "idx:  600  Epoch:  33  loss:  8.096865  Elapsed time:  30.404662132263184\n",
      "idx:  650  Epoch:  33  loss:  6.16065  Elapsed time:  34.98266911506653\n",
      "idx:  700  Epoch:  33  loss:  7.8840575  Elapsed time:  31.50373387336731\n",
      "idx:  750  Epoch:  33  loss:  6.395338  Elapsed time:  31.73529601097107\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  800  Epoch:  33  loss:  7.783546  Elapsed time:  30.888098001480103\n",
      "idx:  850  Epoch:  33  loss:  6.925057  Elapsed time:  30.932841300964355\n",
      "idx:  900  Epoch:  33  loss:  6.3231363  Elapsed time:  34.18598031997681\n",
      "idx:  950  Epoch:  33  loss:  7.743784  Elapsed time:  33.46364688873291\n",
      "idx:  1000  Epoch:  33  loss:  6.6062574  Elapsed time:  33.204254150390625\n",
      "idx:  1050  Epoch:  33  loss:  8.116552  Elapsed time:  31.378398180007935\n",
      "idx:  1100  Epoch:  33  loss:  6.091733  Elapsed time:  33.21420121192932\n",
      "idx:  1150  Epoch:  33  loss:  7.039265  Elapsed time:  34.161595821380615\n",
      "idx:  1200  Epoch:  33  loss:  7.703246  Elapsed time:  32.270628929138184\n",
      "idx:  1250  Epoch:  33  loss:  7.567116  Elapsed time:  31.442254066467285\n",
      "idx:  1300  Epoch:  33  loss:  6.696766  Elapsed time:  32.49578857421875\n",
      "idx:  1350  Epoch:  33  loss:  7.6543956  Elapsed time:  34.76596474647522\n",
      "idx:  1400  Epoch:  33  loss:  7.389071  Elapsed time:  33.3417751789093\n",
      "idx:  0  Epoch:  34  loss:  6.481597  Elapsed time:  33.22344398498535\n",
      "idx:  50  Epoch:  34  loss:  7.1758084  Elapsed time:  31.585881233215332\n",
      "idx:  100  Epoch:  34  loss:  6.8959856  Elapsed time:  32.822904109954834\n",
      "idx:  150  Epoch:  34  loss:  6.746674  Elapsed time:  32.01723313331604\n",
      "idx:  200  Epoch:  34  loss:  6.4701624  Elapsed time:  33.93780708312988\n",
      "idx:  250  Epoch:  34  loss:  6.0580654  Elapsed time:  31.82191300392151\n",
      "idx:  300  Epoch:  34  loss:  8.045473  Elapsed time:  31.196720123291016\n",
      "idx:  350  Epoch:  34  loss:  6.541729  Elapsed time:  32.21182703971863\n",
      "idx:  400  Epoch:  34  loss:  6.905308  Elapsed time:  33.818297147750854\n",
      "idx:  450  Epoch:  34  loss:  6.997265  Elapsed time:  32.4143590927124\n",
      "idx:  500  Epoch:  34  loss:  8.602818  Elapsed time:  32.953285217285156\n",
      "idx:  550  Epoch:  34  loss:  6.6754537  Elapsed time:  33.52058696746826\n",
      "idx:  600  Epoch:  34  loss:  7.6507277  Elapsed time:  33.845191955566406\n",
      "idx:  650  Epoch:  34  loss:  6.4149103  Elapsed time:  31.247934818267822\n",
      "idx:  700  Epoch:  34  loss:  7.408281  Elapsed time:  34.047579288482666\n",
      "idx:  750  Epoch:  34  loss:  6.387383  Elapsed time:  33.51845598220825\n",
      "idx:  800  Epoch:  34  loss:  7.1365547  Elapsed time:  31.082221031188965\n",
      "idx:  850  Epoch:  34  loss:  8.332566  Elapsed time:  31.30933690071106\n",
      "idx:  900  Epoch:  34  loss:  6.0039315  Elapsed time:  31.44389581680298\n",
      "idx:  950  Epoch:  34  loss:  9.211266  Elapsed time:  32.42683720588684\n",
      "idx:  1000  Epoch:  34  loss:  6.8015876  Elapsed time:  32.76892900466919\n",
      "idx:  1050  Epoch:  34  loss:  6.771734  Elapsed time:  33.385422229766846\n",
      "idx:  1100  Epoch:  34  loss:  6.199576  Elapsed time:  31.400106191635132\n",
      "idx:  1150  Epoch:  34  loss:  8.073018  Elapsed time:  32.03331899642944\n",
      "idx:  1200  Epoch:  34  loss:  9.022055  Elapsed time:  31.55842685699463\n",
      "idx:  1250  Epoch:  34  loss:  8.147645  Elapsed time:  30.036792755126953\n",
      "idx:  1300  Epoch:  34  loss:  7.285895  Elapsed time:  31.95978093147278\n",
      "idx:  1350  Epoch:  34  loss:  9.29545  Elapsed time:  32.500405073165894\n",
      "idx:  1400  Epoch:  34  loss:  7.855416  Elapsed time:  31.038624048233032\n",
      "idx:  0  Epoch:  35  loss:  6.953835  Elapsed time:  30.49977707862854\n",
      "idx:  50  Epoch:  35  loss:  7.281603  Elapsed time:  33.29564309120178\n",
      "idx:  100  Epoch:  35  loss:  7.415793  Elapsed time:  30.493417978286743\n",
      "idx:  150  Epoch:  35  loss:  7.3508697  Elapsed time:  33.89171004295349\n",
      "idx:  200  Epoch:  35  loss:  8.789757  Elapsed time:  35.130619049072266\n",
      "idx:  250  Epoch:  35  loss:  8.669485  Elapsed time:  32.68454194068909\n",
      "idx:  300  Epoch:  35  loss:  8.083551  Elapsed time:  34.07766008377075\n",
      "idx:  350  Epoch:  35  loss:  6.635087  Elapsed time:  33.63243103027344\n",
      "idx:  400  Epoch:  35  loss:  5.606164  Elapsed time:  31.744930028915405\n",
      "idx:  450  Epoch:  35  loss:  6.4911246  Elapsed time:  30.912342071533203\n",
      "idx:  500  Epoch:  35  loss:  7.2052965  Elapsed time:  30.576065063476562\n",
      "idx:  550  Epoch:  35  loss:  8.134251  Elapsed time:  32.94980025291443\n",
      "idx:  600  Epoch:  35  loss:  7.373672  Elapsed time:  33.589684009552\n",
      "idx:  650  Epoch:  35  loss:  6.9434156  Elapsed time:  35.236809968948364\n",
      "idx:  700  Epoch:  35  loss:  6.9898934  Elapsed time:  33.02375674247742\n",
      "idx:  750  Epoch:  35  loss:  6.592751  Elapsed time:  31.48382806777954\n",
      "idx:  800  Epoch:  35  loss:  7.66792  Elapsed time:  31.993311882019043\n",
      "idx:  850  Epoch:  35  loss:  8.582841  Elapsed time:  34.318294048309326\n",
      "idx:  900  Epoch:  35  loss:  7.1239223  Elapsed time:  33.12456798553467\n",
      "idx:  950  Epoch:  35  loss:  8.0070505  Elapsed time:  35.351637840270996\n",
      "idx:  1000  Epoch:  35  loss:  6.472945  Elapsed time:  31.01808524131775\n",
      "idx:  1050  Epoch:  35  loss:  6.7290235  Elapsed time:  33.305704832077026\n",
      "idx:  1100  Epoch:  35  loss:  6.1797314  Elapsed time:  34.02523899078369\n",
      "idx:  1150  Epoch:  35  loss:  6.1047845  Elapsed time:  33.43511509895325\n",
      "idx:  1200  Epoch:  35  loss:  6.828685  Elapsed time:  34.63327503204346\n",
      "idx:  1250  Epoch:  35  loss:  7.6974998  Elapsed time:  30.48058319091797\n",
      "idx:  1300  Epoch:  35  loss:  7.4639397  Elapsed time:  33.424495220184326\n",
      "idx:  1350  Epoch:  35  loss:  8.754806  Elapsed time:  32.39578199386597\n",
      "idx:  1400  Epoch:  35  loss:  6.247598  Elapsed time:  30.501906871795654\n",
      "idx:  0  Epoch:  36  loss:  7.785071  Elapsed time:  33.082441329956055\n",
      "idx:  50  Epoch:  36  loss:  6.5313454  Elapsed time:  33.63329100608826\n",
      "idx:  100  Epoch:  36  loss:  7.2523146  Elapsed time:  32.61953401565552\n",
      "idx:  150  Epoch:  36  loss:  6.054114  Elapsed time:  30.950536012649536\n",
      "idx:  200  Epoch:  36  loss:  6.9929075  Elapsed time:  31.58959197998047\n",
      "idx:  250  Epoch:  36  loss:  7.6273084  Elapsed time:  34.54192090034485\n",
      "idx:  300  Epoch:  36  loss:  7.548788  Elapsed time:  33.92333793640137\n",
      "idx:  350  Epoch:  36  loss:  6.723217  Elapsed time:  33.35384511947632\n",
      "idx:  400  Epoch:  36  loss:  7.3126655  Elapsed time:  31.96580696105957\n",
      "idx:  450  Epoch:  36  loss:  7.80575  Elapsed time:  32.80483913421631\n",
      "idx:  500  Epoch:  36  loss:  7.0156627  Elapsed time:  30.134196996688843\n",
      "idx:  550  Epoch:  36  loss:  5.6475296  Elapsed time:  32.94756293296814\n",
      "idx:  600  Epoch:  36  loss:  6.7037992  Elapsed time:  29.93974280357361\n",
      "idx:  650  Epoch:  36  loss:  6.344162  Elapsed time:  33.492491006851196\n",
      "idx:  700  Epoch:  36  loss:  6.5854745  Elapsed time:  30.885504007339478\n",
      "idx:  750  Epoch:  36  loss:  6.28844  Elapsed time:  31.037839889526367\n",
      "idx:  800  Epoch:  36  loss:  7.853157  Elapsed time:  33.4447979927063\n",
      "idx:  850  Epoch:  36  loss:  6.889584  Elapsed time:  30.405411958694458\n",
      "idx:  900  Epoch:  36  loss:  7.8121085  Elapsed time:  32.73856806755066\n",
      "idx:  950  Epoch:  36  loss:  7.7003846  Elapsed time:  31.6755268573761\n",
      "idx:  1000  Epoch:  36  loss:  7.1961327  Elapsed time:  31.48496675491333\n",
      "idx:  1050  Epoch:  36  loss:  7.142338  Elapsed time:  30.91466999053955\n",
      "idx:  1100  Epoch:  36  loss:  6.2086596  Elapsed time:  31.26409077644348\n",
      "idx:  1150  Epoch:  36  loss:  6.974572  Elapsed time:  33.03198313713074\n",
      "idx:  1200  Epoch:  36  loss:  7.10105  Elapsed time:  31.262369871139526\n",
      "idx:  1250  Epoch:  36  loss:  6.3578167  Elapsed time:  30.738080978393555\n",
      "idx:  1300  Epoch:  36  loss:  7.1235366  Elapsed time:  31.792649030685425\n",
      "idx:  1350  Epoch:  36  loss:  8.470607  Elapsed time:  30.887521743774414\n",
      "idx:  1400  Epoch:  36  loss:  8.871566  Elapsed time:  33.49038505554199\n",
      "idx:  0  Epoch:  37  loss:  6.237961  Elapsed time:  32.174171924591064\n",
      "idx:  50  Epoch:  37  loss:  6.6054573  Elapsed time:  33.576892137527466\n",
      "idx:  100  Epoch:  37  loss:  7.496059  Elapsed time:  33.92791819572449\n",
      "idx:  150  Epoch:  37  loss:  7.9041986  Elapsed time:  33.38138175010681\n",
      "idx:  200  Epoch:  37  loss:  8.419611  Elapsed time:  31.81881594657898\n",
      "idx:  250  Epoch:  37  loss:  6.3177786  Elapsed time:  34.14081120491028\n",
      "idx:  300  Epoch:  37  loss:  7.7398124  Elapsed time:  33.24973487854004\n",
      "idx:  350  Epoch:  37  loss:  7.429516  Elapsed time:  33.47871279716492\n",
      "idx:  400  Epoch:  37  loss:  6.919679  Elapsed time:  35.37876319885254\n",
      "idx:  450  Epoch:  37  loss:  6.4128337  Elapsed time:  31.8366961479187\n",
      "idx:  500  Epoch:  37  loss:  7.7861834  Elapsed time:  34.42938494682312\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  550  Epoch:  37  loss:  6.2290077  Elapsed time:  30.300830364227295\n",
      "idx:  600  Epoch:  37  loss:  6.5787826  Elapsed time:  32.08358812332153\n",
      "idx:  650  Epoch:  37  loss:  7.2904677  Elapsed time:  32.13324213027954\n",
      "idx:  700  Epoch:  37  loss:  7.2692976  Elapsed time:  31.64572501182556\n",
      "idx:  750  Epoch:  37  loss:  6.4014096  Elapsed time:  31.343147039413452\n",
      "idx:  800  Epoch:  37  loss:  7.0294156  Elapsed time:  31.147650241851807\n",
      "idx:  850  Epoch:  37  loss:  7.4375577  Elapsed time:  32.94705820083618\n",
      "idx:  900  Epoch:  37  loss:  8.453251  Elapsed time:  33.95557713508606\n",
      "idx:  950  Epoch:  37  loss:  7.117253  Elapsed time:  33.774139165878296\n",
      "idx:  1000  Epoch:  37  loss:  6.8239737  Elapsed time:  31.89946484565735\n",
      "idx:  1050  Epoch:  37  loss:  8.262327  Elapsed time:  31.01736092567444\n",
      "idx:  1100  Epoch:  37  loss:  7.4684935  Elapsed time:  29.452664136886597\n",
      "idx:  1150  Epoch:  37  loss:  6.822472  Elapsed time:  33.412354946136475\n",
      "idx:  1200  Epoch:  37  loss:  6.917139  Elapsed time:  31.386160850524902\n",
      "idx:  1250  Epoch:  37  loss:  5.9294114  Elapsed time:  31.702065229415894\n",
      "idx:  1300  Epoch:  37  loss:  8.160351  Elapsed time:  33.365362882614136\n",
      "idx:  1350  Epoch:  37  loss:  7.6848617  Elapsed time:  31.536458015441895\n",
      "idx:  1400  Epoch:  37  loss:  7.4428015  Elapsed time:  34.89736485481262\n",
      "idx:  0  Epoch:  38  loss:  8.006016  Elapsed time:  32.62619686126709\n",
      "idx:  50  Epoch:  38  loss:  5.907405  Elapsed time:  31.077389001846313\n",
      "idx:  100  Epoch:  38  loss:  7.2859516  Elapsed time:  32.96769976615906\n",
      "idx:  150  Epoch:  38  loss:  8.5330105  Elapsed time:  31.989844799041748\n",
      "idx:  200  Epoch:  38  loss:  6.83559  Elapsed time:  30.63274598121643\n",
      "idx:  250  Epoch:  38  loss:  6.716186  Elapsed time:  33.225472927093506\n",
      "idx:  300  Epoch:  38  loss:  8.428401  Elapsed time:  34.25086808204651\n",
      "idx:  350  Epoch:  38  loss:  7.7143893  Elapsed time:  33.39335584640503\n",
      "idx:  400  Epoch:  38  loss:  7.4428144  Elapsed time:  31.60982871055603\n",
      "idx:  450  Epoch:  38  loss:  7.5444503  Elapsed time:  31.508018255233765\n",
      "idx:  500  Epoch:  38  loss:  8.931935  Elapsed time:  33.66787505149841\n",
      "idx:  550  Epoch:  38  loss:  7.072212  Elapsed time:  34.728487968444824\n",
      "idx:  600  Epoch:  38  loss:  6.994637  Elapsed time:  31.61225914955139\n",
      "idx:  650  Epoch:  38  loss:  6.569384  Elapsed time:  30.17940902709961\n",
      "idx:  700  Epoch:  38  loss:  6.6611176  Elapsed time:  30.859778881072998\n",
      "idx:  750  Epoch:  38  loss:  7.01887  Elapsed time:  30.529373168945312\n",
      "idx:  800  Epoch:  38  loss:  7.194932  Elapsed time:  29.797960996627808\n",
      "idx:  850  Epoch:  38  loss:  6.732945  Elapsed time:  32.62633419036865\n",
      "idx:  900  Epoch:  38  loss:  6.970185  Elapsed time:  32.30683398246765\n",
      "idx:  950  Epoch:  38  loss:  6.8818207  Elapsed time:  30.962339162826538\n",
      "idx:  1000  Epoch:  38  loss:  6.1691713  Elapsed time:  32.316378116607666\n",
      "idx:  1050  Epoch:  38  loss:  7.2312803  Elapsed time:  31.74179720878601\n",
      "idx:  1100  Epoch:  38  loss:  6.2430434  Elapsed time:  30.62167501449585\n",
      "idx:  1150  Epoch:  38  loss:  6.748611  Elapsed time:  30.63516902923584\n",
      "idx:  1200  Epoch:  38  loss:  7.476537  Elapsed time:  30.471559286117554\n",
      "idx:  1250  Epoch:  38  loss:  7.895341  Elapsed time:  31.111218214035034\n",
      "idx:  1300  Epoch:  38  loss:  8.434224  Elapsed time:  29.92378807067871\n",
      "idx:  1350  Epoch:  38  loss:  8.679231  Elapsed time:  32.56740212440491\n",
      "idx:  1400  Epoch:  38  loss:  8.584479  Elapsed time:  32.83549523353577\n",
      "idx:  0  Epoch:  39  loss:  7.2868958  Elapsed time:  33.15671181678772\n",
      "idx:  50  Epoch:  39  loss:  6.2804213  Elapsed time:  33.119834899902344\n",
      "idx:  100  Epoch:  39  loss:  6.2192664  Elapsed time:  32.23002099990845\n",
      "idx:  150  Epoch:  39  loss:  6.611227  Elapsed time:  34.25675392150879\n",
      "idx:  200  Epoch:  39  loss:  6.7923107  Elapsed time:  32.329710245132446\n",
      "idx:  250  Epoch:  39  loss:  7.573429  Elapsed time:  32.99205136299133\n",
      "idx:  300  Epoch:  39  loss:  6.5412626  Elapsed time:  31.625327110290527\n",
      "idx:  350  Epoch:  39  loss:  5.5229487  Elapsed time:  29.825801134109497\n",
      "idx:  400  Epoch:  39  loss:  5.8372216  Elapsed time:  30.711908102035522\n",
      "idx:  450  Epoch:  39  loss:  8.480534  Elapsed time:  31.797773838043213\n",
      "idx:  500  Epoch:  39  loss:  8.640655  Elapsed time:  33.904322147369385\n",
      "idx:  550  Epoch:  39  loss:  6.1594434  Elapsed time:  30.72249984741211\n",
      "idx:  600  Epoch:  39  loss:  7.3909845  Elapsed time:  33.78104519844055\n",
      "idx:  650  Epoch:  39  loss:  7.7885714  Elapsed time:  32.87525773048401\n",
      "idx:  700  Epoch:  39  loss:  6.0461955  Elapsed time:  30.693933248519897\n",
      "idx:  750  Epoch:  39  loss:  6.1337867  Elapsed time:  33.61993598937988\n",
      "idx:  800  Epoch:  39  loss:  6.341619  Elapsed time:  34.77596378326416\n",
      "idx:  850  Epoch:  39  loss:  7.8508663  Elapsed time:  32.25338125228882\n",
      "idx:  900  Epoch:  39  loss:  6.9373436  Elapsed time:  31.284075021743774\n",
      "idx:  950  Epoch:  39  loss:  7.470954  Elapsed time:  33.80599403381348\n",
      "idx:  1000  Epoch:  39  loss:  6.675223  Elapsed time:  32.98000192642212\n",
      "idx:  1050  Epoch:  39  loss:  7.36853  Elapsed time:  32.088233947753906\n",
      "idx:  1100  Epoch:  39  loss:  7.5342402  Elapsed time:  31.95682716369629\n",
      "idx:  1150  Epoch:  39  loss:  6.270234  Elapsed time:  32.70709300041199\n",
      "idx:  1200  Epoch:  39  loss:  6.589928  Elapsed time:  33.75429606437683\n",
      "idx:  1250  Epoch:  39  loss:  6.3525963  Elapsed time:  31.073807954788208\n",
      "idx:  1300  Epoch:  39  loss:  8.413713  Elapsed time:  34.268858909606934\n",
      "idx:  1350  Epoch:  39  loss:  7.0923634  Elapsed time:  30.799910068511963\n",
      "idx:  1400  Epoch:  39  loss:  6.535187  Elapsed time:  33.9838490486145\n",
      "idx:  0  Epoch:  40  loss:  7.288696  Elapsed time:  33.51855206489563\n",
      "idx:  50  Epoch:  40  loss:  6.8809657  Elapsed time:  31.641531229019165\n",
      "idx:  100  Epoch:  40  loss:  6.174616  Elapsed time:  32.80765199661255\n",
      "idx:  150  Epoch:  40  loss:  7.691053  Elapsed time:  33.25576901435852\n",
      "idx:  200  Epoch:  40  loss:  6.2447467  Elapsed time:  33.03956890106201\n",
      "idx:  250  Epoch:  40  loss:  7.621997  Elapsed time:  33.13439607620239\n",
      "idx:  300  Epoch:  40  loss:  8.7803335  Elapsed time:  33.130530834198\n",
      "idx:  350  Epoch:  40  loss:  7.1081367  Elapsed time:  30.997794151306152\n",
      "idx:  400  Epoch:  40  loss:  6.1155653  Elapsed time:  32.91308307647705\n",
      "idx:  450  Epoch:  40  loss:  6.2972727  Elapsed time:  32.986682176589966\n",
      "idx:  500  Epoch:  40  loss:  7.6479235  Elapsed time:  30.883409023284912\n",
      "idx:  550  Epoch:  40  loss:  6.853016  Elapsed time:  31.85040307044983\n",
      "idx:  600  Epoch:  40  loss:  7.9654055  Elapsed time:  33.580405950546265\n",
      "idx:  650  Epoch:  40  loss:  7.079584  Elapsed time:  32.294140100479126\n",
      "idx:  700  Epoch:  40  loss:  7.379906  Elapsed time:  31.47191882133484\n",
      "idx:  750  Epoch:  40  loss:  6.076919  Elapsed time:  33.81895303726196\n",
      "idx:  800  Epoch:  40  loss:  6.77978  Elapsed time:  31.477656841278076\n",
      "idx:  850  Epoch:  40  loss:  7.06347  Elapsed time:  31.626943111419678\n",
      "idx:  900  Epoch:  40  loss:  7.894185  Elapsed time:  31.431964874267578\n",
      "idx:  950  Epoch:  40  loss:  7.625418  Elapsed time:  33.3480920791626\n",
      "idx:  1000  Epoch:  40  loss:  7.0629563  Elapsed time:  34.04500198364258\n",
      "idx:  1050  Epoch:  40  loss:  7.0942445  Elapsed time:  30.518110036849976\n",
      "idx:  1100  Epoch:  40  loss:  5.9238625  Elapsed time:  30.79231905937195\n",
      "idx:  1150  Epoch:  40  loss:  5.4365935  Elapsed time:  30.90105390548706\n",
      "idx:  1200  Epoch:  40  loss:  7.083187  Elapsed time:  32.95902180671692\n",
      "idx:  1250  Epoch:  40  loss:  6.460609  Elapsed time:  32.9776771068573\n",
      "idx:  1300  Epoch:  40  loss:  6.832871  Elapsed time:  30.949662923812866\n",
      "idx:  1350  Epoch:  40  loss:  7.7367105  Elapsed time:  31.51072382926941\n",
      "idx:  1400  Epoch:  40  loss:  6.9109025  Elapsed time:  32.37857270240784\n",
      "Epoch  40  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  0  Epoch:  41  loss:  7.1003003  Elapsed time:  34.0467050075531\n",
      "idx:  50  Epoch:  41  loss:  5.623437  Elapsed time:  42.717607736587524\n",
      "idx:  100  Epoch:  41  loss:  7.7638636  Elapsed time:  50.56665086746216\n",
      "idx:  150  Epoch:  41  loss:  6.7312512  Elapsed time:  68.47702407836914\n",
      "idx:  200  Epoch:  41  loss:  6.732919  Elapsed time:  66.5414137840271\n",
      "idx:  250  Epoch:  41  loss:  7.1916986  Elapsed time:  66.19903898239136\n",
      "idx:  300  Epoch:  41  loss:  6.622371  Elapsed time:  72.27585625648499\n",
      "idx:  350  Epoch:  41  loss:  5.832455  Elapsed time:  108.48181986808777\n",
      "idx:  400  Epoch:  41  loss:  7.0965867  Elapsed time:  103.18992567062378\n",
      "idx:  450  Epoch:  41  loss:  7.36413  Elapsed time:  97.4323239326477\n",
      "idx:  500  Epoch:  41  loss:  7.147402  Elapsed time:  98.00578093528748\n",
      "idx:  550  Epoch:  41  loss:  7.718274  Elapsed time:  99.39488506317139\n",
      "idx:  600  Epoch:  41  loss:  7.593905  Elapsed time:  98.8389139175415\n",
      "idx:  650  Epoch:  41  loss:  6.4316688  Elapsed time:  114.04573702812195\n",
      "idx:  700  Epoch:  41  loss:  6.612475  Elapsed time:  34321.371561050415\n",
      "idx:  750  Epoch:  41  loss:  6.555312  Elapsed time:  50.14804291725159\n",
      "idx:  800  Epoch:  41  loss:  7.1478887  Elapsed time:  603.2250380516052\n",
      "idx:  850  Epoch:  41  loss:  6.7110267  Elapsed time:  610.3067700862885\n",
      "idx:  900  Epoch:  41  loss:  6.248875  Elapsed time:  606.8570971488953\n",
      "idx:  950  Epoch:  41  loss:  7.0984583  Elapsed time:  609.0573251247406\n",
      "idx:  1000  Epoch:  41  loss:  7.004801  Elapsed time:  604.5789239406586\n",
      "idx:  1050  Epoch:  41  loss:  7.999256  Elapsed time:  7238.185587882996\n",
      "idx:  1100  Epoch:  41  loss:  6.8501525  Elapsed time:  612.6925659179688\n",
      "idx:  1150  Epoch:  41  loss:  7.3227024  Elapsed time:  608.6194627285004\n",
      "idx:  1200  Epoch:  41  loss:  6.844955  Elapsed time:  46.65038800239563\n",
      "idx:  1250  Epoch:  41  loss:  7.3897233  Elapsed time:  37.9102201461792\n",
      "idx:  1300  Epoch:  41  loss:  7.693025  Elapsed time:  36.35050177574158\n",
      "idx:  1350  Epoch:  41  loss:  6.407631  Elapsed time:  37.87475323677063\n",
      "idx:  1400  Epoch:  41  loss:  6.686993  Elapsed time:  35.80140423774719\n",
      "idx:  0  Epoch:  42  loss:  7.691017  Elapsed time:  33.18321490287781\n",
      "idx:  50  Epoch:  42  loss:  7.8384175  Elapsed time:  35.8485848903656\n",
      "idx:  100  Epoch:  42  loss:  8.615894  Elapsed time:  34.6557297706604\n",
      "idx:  150  Epoch:  42  loss:  7.025096  Elapsed time:  35.85947299003601\n",
      "idx:  200  Epoch:  42  loss:  6.2329693  Elapsed time:  34.936612129211426\n",
      "idx:  250  Epoch:  42  loss:  7.6159205  Elapsed time:  34.4872260093689\n",
      "idx:  300  Epoch:  42  loss:  5.903431  Elapsed time:  32.406569957733154\n",
      "idx:  350  Epoch:  42  loss:  6.997389  Elapsed time:  34.832653284072876\n",
      "idx:  400  Epoch:  42  loss:  5.793432  Elapsed time:  33.29761004447937\n",
      "idx:  450  Epoch:  42  loss:  6.9000688  Elapsed time:  35.30804395675659\n",
      "idx:  500  Epoch:  42  loss:  7.2931128  Elapsed time:  35.14678597450256\n",
      "idx:  550  Epoch:  42  loss:  7.758037  Elapsed time:  34.408825159072876\n",
      "idx:  600  Epoch:  42  loss:  7.725826  Elapsed time:  35.18648290634155\n",
      "idx:  650  Epoch:  42  loss:  7.202228  Elapsed time:  33.80023503303528\n",
      "idx:  700  Epoch:  42  loss:  6.7982655  Elapsed time:  38.32494616508484\n",
      "idx:  750  Epoch:  42  loss:  7.3145814  Elapsed time:  35.352643966674805\n",
      "idx:  800  Epoch:  42  loss:  7.6724215  Elapsed time:  36.88010382652283\n",
      "idx:  850  Epoch:  42  loss:  8.572629  Elapsed time:  35.61994290351868\n",
      "idx:  900  Epoch:  42  loss:  5.830004  Elapsed time:  33.81555700302124\n",
      "idx:  950  Epoch:  42  loss:  6.414784  Elapsed time:  33.36822295188904\n",
      "idx:  1000  Epoch:  42  loss:  7.70719  Elapsed time:  34.45173931121826\n",
      "idx:  1050  Epoch:  42  loss:  8.070717  Elapsed time:  34.573282957077026\n",
      "idx:  1100  Epoch:  42  loss:  5.680143  Elapsed time:  32.47920632362366\n",
      "idx:  1150  Epoch:  42  loss:  6.632171  Elapsed time:  31.965163946151733\n",
      "idx:  1200  Epoch:  42  loss:  8.232647  Elapsed time:  35.240291118621826\n",
      "idx:  1250  Epoch:  42  loss:  7.0325117  Elapsed time:  35.60017204284668\n",
      "idx:  1300  Epoch:  42  loss:  6.5986724  Elapsed time:  35.35116696357727\n",
      "idx:  1350  Epoch:  42  loss:  6.0107965  Elapsed time:  36.89375710487366\n",
      "idx:  1400  Epoch:  42  loss:  6.7567587  Elapsed time:  34.9764769077301\n",
      "idx:  0  Epoch:  43  loss:  7.3057456  Elapsed time:  34.95770502090454\n",
      "idx:  50  Epoch:  43  loss:  7.460654  Elapsed time:  35.734220027923584\n",
      "idx:  100  Epoch:  43  loss:  7.0817556  Elapsed time:  34.14383101463318\n",
      "idx:  150  Epoch:  43  loss:  7.002895  Elapsed time:  34.0404531955719\n",
      "idx:  200  Epoch:  43  loss:  7.0787406  Elapsed time:  35.504143714904785\n",
      "idx:  250  Epoch:  43  loss:  5.42897  Elapsed time:  34.07165193557739\n",
      "idx:  300  Epoch:  43  loss:  8.045495  Elapsed time:  36.44276022911072\n",
      "idx:  350  Epoch:  43  loss:  6.3777633  Elapsed time:  36.360719203948975\n",
      "idx:  400  Epoch:  43  loss:  6.9688783  Elapsed time:  34.957881927490234\n",
      "idx:  450  Epoch:  43  loss:  7.0912857  Elapsed time:  34.34794330596924\n",
      "idx:  500  Epoch:  43  loss:  6.7974553  Elapsed time:  35.16543507575989\n",
      "idx:  550  Epoch:  43  loss:  6.7476788  Elapsed time:  36.33155679702759\n",
      "idx:  600  Epoch:  43  loss:  7.6617665  Elapsed time:  34.687278032302856\n",
      "idx:  650  Epoch:  43  loss:  6.7175355  Elapsed time:  32.734184980392456\n",
      "idx:  700  Epoch:  43  loss:  8.299014  Elapsed time:  33.815277099609375\n",
      "idx:  750  Epoch:  43  loss:  5.9280677  Elapsed time:  36.326234102249146\n",
      "idx:  800  Epoch:  43  loss:  7.265307  Elapsed time:  34.42427182197571\n",
      "idx:  850  Epoch:  43  loss:  8.6606455  Elapsed time:  35.707151889801025\n",
      "idx:  900  Epoch:  43  loss:  6.32413  Elapsed time:  35.370869159698486\n",
      "idx:  950  Epoch:  43  loss:  7.613902  Elapsed time:  32.57417178153992\n",
      "idx:  1000  Epoch:  43  loss:  5.9533367  Elapsed time:  32.07333707809448\n",
      "idx:  1050  Epoch:  43  loss:  6.991048  Elapsed time:  34.49854278564453\n",
      "idx:  1100  Epoch:  43  loss:  6.2701607  Elapsed time:  33.87902212142944\n",
      "idx:  1150  Epoch:  43  loss:  6.689985  Elapsed time:  33.19008159637451\n",
      "idx:  1200  Epoch:  43  loss:  6.399293  Elapsed time:  34.71210718154907\n",
      "idx:  1250  Epoch:  43  loss:  7.2791805  Elapsed time:  35.21483898162842\n",
      "idx:  1300  Epoch:  43  loss:  7.7160387  Elapsed time:  33.97740817070007\n",
      "idx:  1350  Epoch:  43  loss:  7.4431906  Elapsed time:  36.30428218841553\n",
      "idx:  1400  Epoch:  43  loss:  6.21353  Elapsed time:  33.80736207962036\n",
      "idx:  0  Epoch:  44  loss:  6.505731  Elapsed time:  33.97219920158386\n",
      "idx:  50  Epoch:  44  loss:  6.345873  Elapsed time:  32.438554763793945\n",
      "idx:  100  Epoch:  44  loss:  6.5248666  Elapsed time:  34.152583837509155\n",
      "idx:  150  Epoch:  44  loss:  7.5513105  Elapsed time:  35.63759803771973\n",
      "idx:  200  Epoch:  44  loss:  6.51237  Elapsed time:  34.5235481262207\n",
      "idx:  250  Epoch:  44  loss:  6.397233  Elapsed time:  34.28521776199341\n",
      "idx:  300  Epoch:  44  loss:  9.046333  Elapsed time:  35.16619610786438\n",
      "idx:  350  Epoch:  44  loss:  7.173505  Elapsed time:  32.879645109176636\n",
      "idx:  400  Epoch:  44  loss:  7.532164  Elapsed time:  34.19168305397034\n",
      "idx:  450  Epoch:  44  loss:  7.155423  Elapsed time:  34.53265190124512\n",
      "idx:  500  Epoch:  44  loss:  8.087522  Elapsed time:  36.54496717453003\n",
      "idx:  550  Epoch:  44  loss:  5.8783984  Elapsed time:  35.93267798423767\n",
      "idx:  600  Epoch:  44  loss:  7.1697197  Elapsed time:  34.33079814910889\n",
      "idx:  650  Epoch:  44  loss:  6.1591496  Elapsed time:  32.09768486022949\n",
      "idx:  700  Epoch:  44  loss:  7.7177954  Elapsed time:  34.073566913604736\n",
      "idx:  750  Epoch:  44  loss:  6.125263  Elapsed time:  33.962849855422974\n",
      "idx:  800  Epoch:  44  loss:  5.784477  Elapsed time:  34.136435985565186\n",
      "idx:  850  Epoch:  44  loss:  7.908225  Elapsed time:  32.21346092224121\n",
      "idx:  900  Epoch:  44  loss:  7.4502735  Elapsed time:  34.35105609893799\n",
      "idx:  950  Epoch:  44  loss:  7.9257298  Elapsed time:  34.24328398704529\n",
      "idx:  1000  Epoch:  44  loss:  6.5530047  Elapsed time:  34.509769916534424\n",
      "idx:  1050  Epoch:  44  loss:  7.1409874  Elapsed time:  35.114741802215576\n",
      "idx:  1100  Epoch:  44  loss:  7.415432  Elapsed time:  31.81030011177063\n",
      "idx:  1150  Epoch:  44  loss:  7.086041  Elapsed time:  35.16135501861572\n",
      "idx:  1200  Epoch:  44  loss:  7.7199097  Elapsed time:  35.476233959198\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  1250  Epoch:  44  loss:  6.495513  Elapsed time:  35.82964468002319\n",
      "idx:  1300  Epoch:  44  loss:  6.767736  Elapsed time:  33.83223509788513\n",
      "idx:  1350  Epoch:  44  loss:  7.3623457  Elapsed time:  34.708595991134644\n",
      "idx:  1400  Epoch:  44  loss:  6.193482  Elapsed time:  31.72783088684082\n",
      "idx:  0  Epoch:  45  loss:  7.2070723  Elapsed time:  34.00641703605652\n",
      "idx:  50  Epoch:  45  loss:  6.5352926  Elapsed time:  33.50560998916626\n",
      "idx:  100  Epoch:  45  loss:  6.986552  Elapsed time:  35.78262972831726\n",
      "idx:  150  Epoch:  45  loss:  7.2872753  Elapsed time:  34.170320987701416\n",
      "idx:  200  Epoch:  45  loss:  6.2916846  Elapsed time:  34.5517361164093\n",
      "idx:  250  Epoch:  45  loss:  5.40392  Elapsed time:  34.30377006530762\n",
      "idx:  300  Epoch:  45  loss:  6.9039536  Elapsed time:  35.78252601623535\n",
      "idx:  350  Epoch:  45  loss:  7.1886916  Elapsed time:  34.010966062545776\n",
      "idx:  400  Epoch:  45  loss:  6.830749  Elapsed time:  36.36634111404419\n",
      "idx:  450  Epoch:  45  loss:  7.3785973  Elapsed time:  32.71823787689209\n",
      "idx:  500  Epoch:  45  loss:  7.9202075  Elapsed time:  34.800018072128296\n",
      "idx:  550  Epoch:  45  loss:  7.312724  Elapsed time:  35.40586304664612\n",
      "idx:  600  Epoch:  45  loss:  6.1117296  Elapsed time:  34.979576110839844\n",
      "idx:  650  Epoch:  45  loss:  6.5205107  Elapsed time:  34.47066307067871\n",
      "idx:  700  Epoch:  45  loss:  5.663471  Elapsed time:  35.25977277755737\n",
      "idx:  750  Epoch:  45  loss:  6.072093  Elapsed time:  34.61169385910034\n",
      "idx:  800  Epoch:  45  loss:  7.889784  Elapsed time:  33.4329559803009\n",
      "idx:  850  Epoch:  45  loss:  7.453983  Elapsed time:  33.90661573410034\n",
      "idx:  900  Epoch:  45  loss:  6.7483335  Elapsed time:  32.94464612007141\n",
      "idx:  950  Epoch:  45  loss:  5.974676  Elapsed time:  33.25391387939453\n",
      "idx:  1000  Epoch:  45  loss:  8.568782  Elapsed time:  33.892122983932495\n",
      "idx:  1050  Epoch:  45  loss:  6.578603  Elapsed time:  33.9574499130249\n",
      "idx:  1100  Epoch:  45  loss:  6.6101427  Elapsed time:  35.359736919403076\n",
      "idx:  1150  Epoch:  45  loss:  5.87733  Elapsed time:  34.60891103744507\n",
      "idx:  1200  Epoch:  45  loss:  6.952535  Elapsed time:  35.21771597862244\n",
      "idx:  1250  Epoch:  45  loss:  6.806291  Elapsed time:  32.4887170791626\n",
      "idx:  1300  Epoch:  45  loss:  7.35571  Elapsed time:  31.342133045196533\n",
      "idx:  1350  Epoch:  45  loss:  7.219685  Elapsed time:  34.33590507507324\n",
      "idx:  1400  Epoch:  45  loss:  6.900117  Elapsed time:  34.25112199783325\n",
      "idx:  0  Epoch:  46  loss:  5.9700055  Elapsed time:  34.683045864105225\n",
      "idx:  50  Epoch:  46  loss:  7.220469  Elapsed time:  35.45518493652344\n",
      "idx:  100  Epoch:  46  loss:  6.064725  Elapsed time:  31.806578159332275\n",
      "idx:  150  Epoch:  46  loss:  8.235851  Elapsed time:  34.56584715843201\n",
      "idx:  200  Epoch:  46  loss:  6.935784  Elapsed time:  34.34882307052612\n",
      "idx:  250  Epoch:  46  loss:  6.956239  Elapsed time:  34.16551494598389\n",
      "idx:  300  Epoch:  46  loss:  6.7913647  Elapsed time:  31.402148246765137\n",
      "idx:  350  Epoch:  46  loss:  6.704434  Elapsed time:  34.93023061752319\n",
      "idx:  400  Epoch:  46  loss:  7.426603  Elapsed time:  33.26923489570618\n",
      "idx:  450  Epoch:  46  loss:  6.8307753  Elapsed time:  34.15232515335083\n",
      "idx:  500  Epoch:  46  loss:  6.3726873  Elapsed time:  34.442883014678955\n",
      "idx:  550  Epoch:  46  loss:  7.0928693  Elapsed time:  35.11565399169922\n",
      "idx:  600  Epoch:  46  loss:  8.021579  Elapsed time:  31.856528997421265\n",
      "idx:  650  Epoch:  46  loss:  5.8873377  Elapsed time:  35.05771088600159\n",
      "idx:  700  Epoch:  46  loss:  6.617007  Elapsed time:  35.52039694786072\n",
      "idx:  750  Epoch:  46  loss:  6.211827  Elapsed time:  34.878584146499634\n",
      "idx:  800  Epoch:  46  loss:  7.1596265  Elapsed time:  34.22595477104187\n",
      "idx:  850  Epoch:  46  loss:  7.970443  Elapsed time:  33.33206510543823\n",
      "idx:  900  Epoch:  46  loss:  7.475481  Elapsed time:  34.87100315093994\n",
      "idx:  950  Epoch:  46  loss:  7.9484124  Elapsed time:  34.58232760429382\n",
      "idx:  1000  Epoch:  46  loss:  6.8488045  Elapsed time:  35.41651105880737\n",
      "idx:  1050  Epoch:  46  loss:  6.913437  Elapsed time:  34.18781518936157\n",
      "idx:  1100  Epoch:  46  loss:  5.44221  Elapsed time:  34.827877044677734\n",
      "idx:  1150  Epoch:  46  loss:  7.356343  Elapsed time:  35.532058000564575\n",
      "idx:  1200  Epoch:  46  loss:  7.6450963  Elapsed time:  35.70568895339966\n",
      "idx:  1250  Epoch:  46  loss:  8.636746  Elapsed time:  33.777496099472046\n",
      "idx:  1300  Epoch:  46  loss:  6.840735  Elapsed time:  32.74356818199158\n",
      "idx:  1350  Epoch:  46  loss:  7.775852  Elapsed time:  32.505804777145386\n",
      "idx:  1400  Epoch:  46  loss:  7.0698195  Elapsed time:  31.907347917556763\n",
      "idx:  0  Epoch:  47  loss:  7.1246037  Elapsed time:  34.741806983947754\n",
      "idx:  50  Epoch:  47  loss:  5.944985  Elapsed time:  33.39815306663513\n",
      "idx:  100  Epoch:  47  loss:  6.9905543  Elapsed time:  33.37121510505676\n",
      "idx:  150  Epoch:  47  loss:  6.7837453  Elapsed time:  34.01262187957764\n",
      "idx:  200  Epoch:  47  loss:  6.762864  Elapsed time:  36.57922983169556\n",
      "idx:  250  Epoch:  47  loss:  6.531042  Elapsed time:  34.35881972312927\n",
      "idx:  300  Epoch:  47  loss:  7.101413  Elapsed time:  35.25328707695007\n",
      "idx:  350  Epoch:  47  loss:  6.5298314  Elapsed time:  34.13198471069336\n",
      "idx:  400  Epoch:  47  loss:  6.0413995  Elapsed time:  34.13152003288269\n",
      "idx:  450  Epoch:  47  loss:  6.9806385  Elapsed time:  34.382500886917114\n",
      "idx:  500  Epoch:  47  loss:  7.2972965  Elapsed time:  32.78665590286255\n",
      "idx:  550  Epoch:  47  loss:  6.108526  Elapsed time:  33.63908886909485\n",
      "idx:  600  Epoch:  47  loss:  6.2811947  Elapsed time:  33.2419011592865\n",
      "idx:  650  Epoch:  47  loss:  7.0091405  Elapsed time:  34.2127480506897\n",
      "idx:  700  Epoch:  47  loss:  6.8407564  Elapsed time:  34.392176151275635\n",
      "idx:  750  Epoch:  47  loss:  6.1205726  Elapsed time:  33.2592499256134\n",
      "idx:  800  Epoch:  47  loss:  7.3011613  Elapsed time:  34.15065383911133\n",
      "idx:  850  Epoch:  47  loss:  7.243303  Elapsed time:  35.31539511680603\n",
      "idx:  900  Epoch:  47  loss:  5.9361014  Elapsed time:  32.71203398704529\n",
      "idx:  950  Epoch:  47  loss:  6.49953  Elapsed time:  35.25753712654114\n",
      "idx:  1000  Epoch:  47  loss:  6.407977  Elapsed time:  34.931718826293945\n",
      "idx:  1050  Epoch:  47  loss:  6.164352  Elapsed time:  34.757392168045044\n",
      "idx:  1100  Epoch:  47  loss:  7.6453586  Elapsed time:  35.028876066207886\n",
      "idx:  1150  Epoch:  47  loss:  7.3048067  Elapsed time:  35.36318898200989\n",
      "idx:  1200  Epoch:  47  loss:  7.3788667  Elapsed time:  35.8419451713562\n",
      "idx:  1250  Epoch:  47  loss:  6.3813252  Elapsed time:  35.268802881240845\n",
      "idx:  1300  Epoch:  47  loss:  7.410594  Elapsed time:  34.04652404785156\n",
      "idx:  1350  Epoch:  47  loss:  8.235101  Elapsed time:  31.875895738601685\n",
      "idx:  1400  Epoch:  47  loss:  7.705014  Elapsed time:  33.91910195350647\n",
      "idx:  0  Epoch:  48  loss:  6.3774233  Elapsed time:  31.696924924850464\n",
      "idx:  50  Epoch:  48  loss:  7.0593834  Elapsed time:  34.55283308029175\n",
      "idx:  100  Epoch:  48  loss:  7.748869  Elapsed time:  33.80476713180542\n",
      "idx:  150  Epoch:  48  loss:  6.6913595  Elapsed time:  32.82207107543945\n",
      "idx:  200  Epoch:  48  loss:  6.4030194  Elapsed time:  33.0492959022522\n",
      "idx:  250  Epoch:  48  loss:  6.682179  Elapsed time:  36.0228910446167\n",
      "idx:  300  Epoch:  48  loss:  6.619632  Elapsed time:  35.51742219924927\n",
      "idx:  350  Epoch:  48  loss:  6.773769  Elapsed time:  32.968411922454834\n",
      "idx:  400  Epoch:  48  loss:  6.460675  Elapsed time:  33.4831428527832\n",
      "idx:  450  Epoch:  48  loss:  5.705995  Elapsed time:  34.24967980384827\n",
      "idx:  500  Epoch:  48  loss:  6.477171  Elapsed time:  34.63902688026428\n",
      "idx:  550  Epoch:  48  loss:  6.65857  Elapsed time:  33.21327805519104\n",
      "idx:  600  Epoch:  48  loss:  6.7294264  Elapsed time:  33.84302830696106\n",
      "idx:  650  Epoch:  48  loss:  6.676342  Elapsed time:  34.41608905792236\n",
      "idx:  700  Epoch:  48  loss:  7.3235373  Elapsed time:  33.81688594818115\n",
      "idx:  750  Epoch:  48  loss:  6.6073093  Elapsed time:  32.590516090393066\n",
      "idx:  800  Epoch:  48  loss:  7.8942184  Elapsed time:  34.74581980705261\n",
      "idx:  850  Epoch:  48  loss:  6.631606  Elapsed time:  35.0871901512146\n",
      "idx:  900  Epoch:  48  loss:  6.932944  Elapsed time:  35.95506691932678\n",
      "idx:  950  Epoch:  48  loss:  7.004598  Elapsed time:  36.119120836257935\n",
      "idx:  1000  Epoch:  48  loss:  7.285005  Elapsed time:  35.044400215148926\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  1050  Epoch:  48  loss:  6.661149  Elapsed time:  33.09788489341736\n",
      "idx:  1100  Epoch:  48  loss:  6.6176486  Elapsed time:  35.04351997375488\n",
      "idx:  1150  Epoch:  48  loss:  7.9410667  Elapsed time:  35.04402995109558\n",
      "idx:  1200  Epoch:  48  loss:  6.208637  Elapsed time:  32.853431940078735\n",
      "idx:  1250  Epoch:  48  loss:  6.4390182  Elapsed time:  35.127262115478516\n",
      "idx:  1300  Epoch:  48  loss:  7.600699  Elapsed time:  34.16447615623474\n",
      "idx:  1350  Epoch:  48  loss:  6.2889853  Elapsed time:  33.681994915008545\n",
      "idx:  1400  Epoch:  48  loss:  6.5070124  Elapsed time:  34.90817999839783\n",
      "idx:  0  Epoch:  49  loss:  7.1867447  Elapsed time:  35.098814964294434\n",
      "idx:  50  Epoch:  49  loss:  5.901233  Elapsed time:  34.87979292869568\n",
      "idx:  100  Epoch:  49  loss:  5.8779073  Elapsed time:  35.51928496360779\n",
      "idx:  150  Epoch:  49  loss:  7.331081  Elapsed time:  33.26769208908081\n",
      "idx:  200  Epoch:  49  loss:  6.505862  Elapsed time:  34.5626437664032\n",
      "idx:  250  Epoch:  49  loss:  6.888991  Elapsed time:  34.40212297439575\n",
      "idx:  300  Epoch:  49  loss:  7.216097  Elapsed time:  34.57246708869934\n",
      "idx:  350  Epoch:  49  loss:  6.0033484  Elapsed time:  35.39906597137451\n",
      "idx:  400  Epoch:  49  loss:  6.8248644  Elapsed time:  33.082322120666504\n",
      "idx:  450  Epoch:  49  loss:  6.401449  Elapsed time:  34.249797105789185\n",
      "idx:  500  Epoch:  49  loss:  8.494637  Elapsed time:  32.39391493797302\n",
      "idx:  550  Epoch:  49  loss:  7.364313  Elapsed time:  34.84299397468567\n",
      "idx:  600  Epoch:  49  loss:  8.364168  Elapsed time:  35.30259466171265\n",
      "idx:  650  Epoch:  49  loss:  6.797299  Elapsed time:  35.4157190322876\n",
      "idx:  700  Epoch:  49  loss:  7.7620754  Elapsed time:  35.08405518531799\n",
      "idx:  750  Epoch:  49  loss:  6.871441  Elapsed time:  36.09694790840149\n",
      "idx:  800  Epoch:  49  loss:  6.576699  Elapsed time:  32.196954011917114\n",
      "idx:  850  Epoch:  49  loss:  7.4398456  Elapsed time:  32.2594952583313\n",
      "idx:  900  Epoch:  49  loss:  6.348084  Elapsed time:  35.47735619544983\n",
      "idx:  950  Epoch:  49  loss:  6.9692073  Elapsed time:  36.37460494041443\n",
      "idx:  1000  Epoch:  49  loss:  6.493445  Elapsed time:  34.36428999900818\n",
      "idx:  1050  Epoch:  49  loss:  6.4303513  Elapsed time:  33.75970101356506\n",
      "idx:  1100  Epoch:  49  loss:  7.3004494  Elapsed time:  34.28793430328369\n",
      "idx:  1150  Epoch:  49  loss:  6.6505876  Elapsed time:  33.42270469665527\n",
      "idx:  1200  Epoch:  49  loss:  5.8308578  Elapsed time:  34.01128673553467\n",
      "idx:  1250  Epoch:  49  loss:  6.7970815  Elapsed time:  34.26734209060669\n",
      "idx:  1300  Epoch:  49  loss:  6.8115587  Elapsed time:  32.347203969955444\n",
      "idx:  1350  Epoch:  49  loss:  7.8650527  Elapsed time:  32.64580202102661\n",
      "idx:  1400  Epoch:  49  loss:  6.113742  Elapsed time:  33.06075382232666\n",
      "idx:  0  Epoch:  50  loss:  6.9430413  Elapsed time:  32.96580791473389\n",
      "idx:  50  Epoch:  50  loss:  6.492691  Elapsed time:  36.13999891281128\n",
      "idx:  100  Epoch:  50  loss:  6.9236336  Elapsed time:  33.98748016357422\n",
      "idx:  150  Epoch:  50  loss:  6.6490164  Elapsed time:  34.64059281349182\n",
      "idx:  200  Epoch:  50  loss:  6.021501  Elapsed time:  34.661786794662476\n",
      "idx:  250  Epoch:  50  loss:  6.222193  Elapsed time:  31.20279335975647\n",
      "idx:  300  Epoch:  50  loss:  7.410828  Elapsed time:  34.87324810028076\n",
      "idx:  350  Epoch:  50  loss:  6.0083013  Elapsed time:  34.15648102760315\n",
      "idx:  400  Epoch:  50  loss:  5.5838246  Elapsed time:  34.94724893569946\n",
      "idx:  450  Epoch:  50  loss:  6.7780275  Elapsed time:  34.669686794281006\n",
      "idx:  500  Epoch:  50  loss:  6.6888604  Elapsed time:  35.620142221450806\n",
      "idx:  550  Epoch:  50  loss:  6.221033  Elapsed time:  31.949570894241333\n",
      "idx:  600  Epoch:  50  loss:  7.6261506  Elapsed time:  34.02110481262207\n",
      "idx:  650  Epoch:  50  loss:  7.3590794  Elapsed time:  32.91870903968811\n",
      "idx:  700  Epoch:  50  loss:  6.6355753  Elapsed time:  33.50815677642822\n",
      "idx:  750  Epoch:  50  loss:  6.5398946  Elapsed time:  34.362473011016846\n",
      "idx:  800  Epoch:  50  loss:  6.8206224  Elapsed time:  33.64212203025818\n",
      "idx:  850  Epoch:  50  loss:  7.3334146  Elapsed time:  34.20499086380005\n",
      "idx:  900  Epoch:  50  loss:  7.0445123  Elapsed time:  34.99316191673279\n",
      "idx:  950  Epoch:  50  loss:  6.7163057  Elapsed time:  32.44335103034973\n",
      "idx:  1000  Epoch:  50  loss:  6.2531724  Elapsed time:  34.2617552280426\n",
      "idx:  1050  Epoch:  50  loss:  7.4716115  Elapsed time:  31.859928131103516\n",
      "idx:  1100  Epoch:  50  loss:  6.126424  Elapsed time:  34.41213583946228\n",
      "idx:  1150  Epoch:  50  loss:  7.47968  Elapsed time:  35.42056226730347\n",
      "idx:  1200  Epoch:  50  loss:  7.154967  Elapsed time:  34.39813303947449\n",
      "idx:  1250  Epoch:  50  loss:  6.918526  Elapsed time:  34.82897925376892\n",
      "idx:  1300  Epoch:  50  loss:  8.183609  Elapsed time:  34.201387882232666\n",
      "idx:  1350  Epoch:  50  loss:  6.867011  Elapsed time:  34.28241300582886\n",
      "idx:  1400  Epoch:  50  loss:  6.6468987  Elapsed time:  35.304505825042725\n",
      "Epoch  50  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n",
      "idx:  0  Epoch:  51  loss:  6.75792  Elapsed time:  34.19878602027893\n",
      "idx:  50  Epoch:  51  loss:  6.7014174  Elapsed time:  34.282942056655884\n",
      "idx:  100  Epoch:  51  loss:  6.4129944  Elapsed time:  34.63006901741028\n",
      "idx:  150  Epoch:  51  loss:  6.5745707  Elapsed time:  35.53777194023132\n",
      "idx:  200  Epoch:  51  loss:  7.4335155  Elapsed time:  34.663235902786255\n",
      "idx:  250  Epoch:  51  loss:  6.4518876  Elapsed time:  35.180795192718506\n",
      "idx:  300  Epoch:  51  loss:  7.050171  Elapsed time:  35.01850509643555\n",
      "idx:  350  Epoch:  51  loss:  6.9791884  Elapsed time:  34.378429889678955\n",
      "idx:  400  Epoch:  51  loss:  6.279736  Elapsed time:  34.046576261520386\n",
      "idx:  450  Epoch:  51  loss:  6.5669174  Elapsed time:  35.533133029937744\n",
      "idx:  500  Epoch:  51  loss:  7.3247027  Elapsed time:  35.89916920661926\n",
      "idx:  550  Epoch:  51  loss:  6.377916  Elapsed time:  31.94809913635254\n",
      "idx:  600  Epoch:  51  loss:  6.4839754  Elapsed time:  33.25198316574097\n",
      "idx:  650  Epoch:  51  loss:  6.8410354  Elapsed time:  35.21731901168823\n",
      "idx:  700  Epoch:  51  loss:  6.903904  Elapsed time:  32.58778190612793\n",
      "idx:  750  Epoch:  51  loss:  6.8622255  Elapsed time:  33.73105978965759\n",
      "idx:  800  Epoch:  51  loss:  6.0475893  Elapsed time:  34.94905924797058\n",
      "idx:  850  Epoch:  51  loss:  6.86053  Elapsed time:  34.2358558177948\n",
      "idx:  900  Epoch:  51  loss:  6.3797393  Elapsed time:  33.64920973777771\n",
      "idx:  950  Epoch:  51  loss:  7.10907  Elapsed time:  35.0994188785553\n",
      "idx:  1000  Epoch:  51  loss:  6.0217133  Elapsed time:  34.14158797264099\n",
      "idx:  1050  Epoch:  51  loss:  7.0462365  Elapsed time:  33.537517070770264\n",
      "idx:  1100  Epoch:  51  loss:  6.3939633  Elapsed time:  34.77691125869751\n",
      "idx:  1150  Epoch:  51  loss:  6.51827  Elapsed time:  35.29067873954773\n",
      "idx:  1200  Epoch:  51  loss:  6.21693  Elapsed time:  32.51850128173828\n",
      "idx:  1250  Epoch:  51  loss:  6.528594  Elapsed time:  33.99129319190979\n",
      "idx:  1300  Epoch:  51  loss:  6.7518144  Elapsed time:  34.88171100616455\n",
      "idx:  1350  Epoch:  51  loss:  6.217752  Elapsed time:  35.18439197540283\n",
      "idx:  1400  Epoch:  51  loss:  6.673502  Elapsed time:  34.72965693473816\n",
      "idx:  0  Epoch:  52  loss:  6.778051  Elapsed time:  35.440645694732666\n",
      "idx:  50  Epoch:  52  loss:  6.7281494  Elapsed time:  31.981226921081543\n",
      "idx:  100  Epoch:  52  loss:  7.100902  Elapsed time:  34.05297613143921\n",
      "idx:  150  Epoch:  52  loss:  7.74679  Elapsed time:  34.80080795288086\n",
      "idx:  200  Epoch:  52  loss:  7.1537147  Elapsed time:  34.64928197860718\n",
      "idx:  250  Epoch:  52  loss:  7.3204207  Elapsed time:  35.56760287284851\n",
      "idx:  300  Epoch:  52  loss:  7.3891  Elapsed time:  34.700124979019165\n",
      "idx:  350  Epoch:  52  loss:  6.5202103  Elapsed time:  34.40853691101074\n",
      "idx:  400  Epoch:  52  loss:  7.5539055  Elapsed time:  35.709800243377686\n",
      "idx:  450  Epoch:  52  loss:  5.9612074  Elapsed time:  34.75484490394592\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  500  Epoch:  52  loss:  6.7278724  Elapsed time:  33.64378595352173\n",
      "idx:  550  Epoch:  52  loss:  6.5704336  Elapsed time:  33.127121925354004\n",
      "idx:  600  Epoch:  52  loss:  6.947096  Elapsed time:  33.521838903427124\n",
      "idx:  650  Epoch:  52  loss:  6.3417726  Elapsed time:  34.96752715110779\n",
      "idx:  700  Epoch:  52  loss:  7.191027  Elapsed time:  35.257712841033936\n",
      "idx:  750  Epoch:  52  loss:  5.98839  Elapsed time:  31.558250188827515\n",
      "idx:  800  Epoch:  52  loss:  7.0211344  Elapsed time:  33.838478088378906\n",
      "idx:  850  Epoch:  52  loss:  6.9741883  Elapsed time:  33.82939314842224\n",
      "idx:  900  Epoch:  52  loss:  5.706912  Elapsed time:  34.3756000995636\n",
      "idx:  950  Epoch:  52  loss:  6.4682603  Elapsed time:  36.08769607543945\n",
      "idx:  1000  Epoch:  52  loss:  7.110865  Elapsed time:  34.46661615371704\n",
      "idx:  1050  Epoch:  52  loss:  6.528047  Elapsed time:  34.586769104003906\n",
      "idx:  1100  Epoch:  52  loss:  7.2511754  Elapsed time:  32.925079107284546\n",
      "idx:  1150  Epoch:  52  loss:  6.9396825  Elapsed time:  35.23099398612976\n",
      "idx:  1200  Epoch:  52  loss:  6.3346424  Elapsed time:  35.37437915802002\n",
      "idx:  1250  Epoch:  52  loss:  6.3417697  Elapsed time:  35.582566261291504\n",
      "idx:  1300  Epoch:  52  loss:  7.255121  Elapsed time:  34.15756106376648\n",
      "idx:  1350  Epoch:  52  loss:  7.2765336  Elapsed time:  34.496325969696045\n",
      "idx:  1400  Epoch:  52  loss:  8.1127405  Elapsed time:  35.611552000045776\n",
      "idx:  0  Epoch:  53  loss:  6.9958644  Elapsed time:  33.925057888031006\n",
      "idx:  50  Epoch:  53  loss:  6.3378396  Elapsed time:  34.339961767196655\n",
      "idx:  100  Epoch:  53  loss:  8.0791445  Elapsed time:  34.65143609046936\n",
      "idx:  150  Epoch:  53  loss:  8.045704  Elapsed time:  35.108638048172\n",
      "idx:  200  Epoch:  53  loss:  6.42802  Elapsed time:  34.8867073059082\n",
      "idx:  250  Epoch:  53  loss:  6.498961  Elapsed time:  33.53714871406555\n",
      "idx:  300  Epoch:  53  loss:  6.7507057  Elapsed time:  33.008004903793335\n",
      "idx:  350  Epoch:  53  loss:  5.69982  Elapsed time:  35.62413716316223\n",
      "idx:  400  Epoch:  53  loss:  7.2454877  Elapsed time:  34.1235990524292\n",
      "idx:  450  Epoch:  53  loss:  6.7926254  Elapsed time:  34.073890686035156\n",
      "idx:  500  Epoch:  53  loss:  7.6688724  Elapsed time:  34.33236289024353\n",
      "idx:  550  Epoch:  53  loss:  6.4907813  Elapsed time:  33.037233114242554\n",
      "idx:  600  Epoch:  53  loss:  6.695132  Elapsed time:  34.05287289619446\n",
      "idx:  650  Epoch:  53  loss:  7.5780683  Elapsed time:  34.68919825553894\n",
      "idx:  700  Epoch:  53  loss:  7.509452  Elapsed time:  33.97590398788452\n",
      "idx:  750  Epoch:  53  loss:  6.1517496  Elapsed time:  35.07563495635986\n",
      "idx:  800  Epoch:  53  loss:  7.6662736  Elapsed time:  34.085416316986084\n",
      "idx:  850  Epoch:  53  loss:  6.3550696  Elapsed time:  34.38932013511658\n",
      "idx:  900  Epoch:  53  loss:  6.7984014  Elapsed time:  36.076560735702515\n",
      "idx:  950  Epoch:  53  loss:  5.808021  Elapsed time:  34.804203033447266\n",
      "idx:  1000  Epoch:  53  loss:  7.224201  Elapsed time:  34.186269998550415\n",
      "idx:  1050  Epoch:  53  loss:  6.923547  Elapsed time:  33.577430963516235\n",
      "idx:  1100  Epoch:  53  loss:  6.90161  Elapsed time:  34.73514699935913\n",
      "idx:  1150  Epoch:  53  loss:  6.2289557  Elapsed time:  31.692327976226807\n",
      "idx:  1200  Epoch:  53  loss:  6.800602  Elapsed time:  35.360119104385376\n",
      "idx:  1250  Epoch:  53  loss:  6.1722755  Elapsed time:  35.1971378326416\n",
      "idx:  1300  Epoch:  53  loss:  7.6262608  Elapsed time:  34.352149963378906\n",
      "idx:  1350  Epoch:  53  loss:  6.5489345  Elapsed time:  33.26962184906006\n",
      "idx:  1400  Epoch:  53  loss:  6.1941695  Elapsed time:  31.39609718322754\n",
      "idx:  0  Epoch:  54  loss:  6.1342306  Elapsed time:  33.64349174499512\n",
      "idx:  50  Epoch:  54  loss:  6.342122  Elapsed time:  34.54560685157776\n",
      "idx:  100  Epoch:  54  loss:  6.2268653  Elapsed time:  34.785523891448975\n",
      "idx:  150  Epoch:  54  loss:  7.203934  Elapsed time:  34.08253598213196\n",
      "idx:  200  Epoch:  54  loss:  7.574893  Elapsed time:  35.20893383026123\n",
      "idx:  250  Epoch:  54  loss:  7.428074  Elapsed time:  33.40315318107605\n",
      "idx:  300  Epoch:  54  loss:  6.1809783  Elapsed time:  35.45699214935303\n",
      "idx:  350  Epoch:  54  loss:  6.02235  Elapsed time:  35.15258288383484\n",
      "idx:  400  Epoch:  54  loss:  6.470807  Elapsed time:  33.380805015563965\n",
      "idx:  450  Epoch:  54  loss:  6.171781  Elapsed time:  33.238924980163574\n",
      "idx:  500  Epoch:  54  loss:  7.844248  Elapsed time:  34.228736877441406\n",
      "idx:  550  Epoch:  54  loss:  7.240511  Elapsed time:  34.28441905975342\n",
      "idx:  600  Epoch:  54  loss:  5.5438194  Elapsed time:  34.45403599739075\n",
      "idx:  650  Epoch:  54  loss:  6.3831315  Elapsed time:  33.73445701599121\n",
      "idx:  700  Epoch:  54  loss:  7.0515366  Elapsed time:  34.84218096733093\n",
      "idx:  750  Epoch:  54  loss:  6.120676  Elapsed time:  34.2966890335083\n",
      "idx:  800  Epoch:  54  loss:  6.615261  Elapsed time:  35.37551283836365\n",
      "idx:  850  Epoch:  54  loss:  7.1169004  Elapsed time:  33.79986214637756\n",
      "idx:  900  Epoch:  54  loss:  7.412138  Elapsed time:  34.19463396072388\n",
      "idx:  950  Epoch:  54  loss:  6.709352  Elapsed time:  34.6433219909668\n",
      "idx:  1000  Epoch:  54  loss:  7.5990334  Elapsed time:  33.513734102249146\n",
      "idx:  1050  Epoch:  54  loss:  7.522935  Elapsed time:  34.228729248046875\n",
      "idx:  1100  Epoch:  54  loss:  6.6754036  Elapsed time:  33.97124981880188\n",
      "idx:  1150  Epoch:  54  loss:  7.176944  Elapsed time:  34.83629298210144\n",
      "idx:  1200  Epoch:  54  loss:  6.987976  Elapsed time:  35.49783897399902\n",
      "idx:  1250  Epoch:  54  loss:  7.141099  Elapsed time:  34.10967803001404\n",
      "idx:  1300  Epoch:  54  loss:  7.310615  Elapsed time:  34.70260214805603\n",
      "idx:  1350  Epoch:  54  loss:  7.0569468  Elapsed time:  36.69022512435913\n",
      "idx:  1400  Epoch:  54  loss:  6.571505  Elapsed time:  33.98708891868591\n",
      "idx:  0  Epoch:  55  loss:  6.644708  Elapsed time:  34.94081425666809\n",
      "idx:  50  Epoch:  55  loss:  6.13859  Elapsed time:  34.18699812889099\n",
      "idx:  100  Epoch:  55  loss:  6.6789427  Elapsed time:  35.33539581298828\n",
      "idx:  150  Epoch:  55  loss:  7.049568  Elapsed time:  33.41272282600403\n",
      "idx:  200  Epoch:  55  loss:  6.4556537  Elapsed time:  33.98146891593933\n",
      "idx:  250  Epoch:  55  loss:  7.692763  Elapsed time:  32.622852087020874\n",
      "idx:  300  Epoch:  55  loss:  6.7787127  Elapsed time:  35.18906497955322\n",
      "idx:  350  Epoch:  55  loss:  6.8864493  Elapsed time:  34.822455167770386\n",
      "idx:  400  Epoch:  55  loss:  6.4046364  Elapsed time:  33.74436402320862\n",
      "idx:  450  Epoch:  55  loss:  7.143919  Elapsed time:  32.63477396965027\n",
      "idx:  500  Epoch:  55  loss:  6.0240436  Elapsed time:  34.855149030685425\n",
      "idx:  550  Epoch:  55  loss:  6.220862  Elapsed time:  33.898510217666626\n",
      "idx:  600  Epoch:  55  loss:  6.886022  Elapsed time:  31.677385091781616\n",
      "idx:  650  Epoch:  55  loss:  6.0634155  Elapsed time:  33.581526041030884\n",
      "idx:  700  Epoch:  55  loss:  7.6004734  Elapsed time:  32.881108045578\n",
      "idx:  750  Epoch:  55  loss:  5.950961  Elapsed time:  34.75700402259827\n",
      "idx:  800  Epoch:  55  loss:  7.138392  Elapsed time:  34.28618597984314\n",
      "idx:  850  Epoch:  55  loss:  7.205422  Elapsed time:  35.113004207611084\n",
      "idx:  900  Epoch:  55  loss:  6.217638  Elapsed time:  33.60017013549805\n",
      "idx:  950  Epoch:  55  loss:  7.1218824  Elapsed time:  34.74147820472717\n",
      "idx:  1000  Epoch:  55  loss:  6.702673  Elapsed time:  32.33473610877991\n",
      "idx:  1050  Epoch:  55  loss:  7.5415072  Elapsed time:  34.833115100860596\n",
      "idx:  1100  Epoch:  55  loss:  6.3588176  Elapsed time:  34.44367575645447\n",
      "idx:  1150  Epoch:  55  loss:  6.654255  Elapsed time:  33.85940504074097\n",
      "idx:  1200  Epoch:  55  loss:  6.3602924  Elapsed time:  33.021117210388184\n",
      "idx:  1250  Epoch:  55  loss:  6.305272  Elapsed time:  34.585155725479126\n",
      "idx:  1300  Epoch:  55  loss:  6.6397896  Elapsed time:  34.42791724205017\n",
      "idx:  1350  Epoch:  55  loss:  6.8869147  Elapsed time:  34.425833225250244\n",
      "idx:  1400  Epoch:  55  loss:  6.5391994  Elapsed time:  34.20001697540283\n",
      "idx:  0  Epoch:  56  loss:  7.0186176  Elapsed time:  34.61279106140137\n",
      "idx:  50  Epoch:  56  loss:  7.4378004  Elapsed time:  34.848296880722046\n",
      "idx:  100  Epoch:  56  loss:  6.404728  Elapsed time:  35.22483825683594\n",
      "idx:  150  Epoch:  56  loss:  7.242598  Elapsed time:  34.373234033584595\n",
      "idx:  200  Epoch:  56  loss:  6.905498  Elapsed time:  36.224836111068726\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  250  Epoch:  56  loss:  6.133661  Elapsed time:  34.240641593933105\n",
      "idx:  300  Epoch:  56  loss:  8.045548  Elapsed time:  35.23266410827637\n",
      "idx:  350  Epoch:  56  loss:  6.4579635  Elapsed time:  35.884592056274414\n",
      "idx:  400  Epoch:  56  loss:  6.255757  Elapsed time:  34.67267990112305\n",
      "idx:  450  Epoch:  56  loss:  7.0559983  Elapsed time:  34.441685914993286\n",
      "idx:  500  Epoch:  56  loss:  6.6680117  Elapsed time:  34.269675970077515\n",
      "idx:  550  Epoch:  56  loss:  5.864451  Elapsed time:  34.24297499656677\n",
      "idx:  600  Epoch:  56  loss:  7.7641397  Elapsed time:  31.965338230133057\n",
      "idx:  650  Epoch:  56  loss:  6.5493717  Elapsed time:  33.46974301338196\n",
      "idx:  700  Epoch:  56  loss:  6.1083326  Elapsed time:  35.06490087509155\n",
      "idx:  750  Epoch:  56  loss:  5.8581476  Elapsed time:  35.793964862823486\n",
      "idx:  800  Epoch:  56  loss:  6.8229685  Elapsed time:  35.416709899902344\n",
      "idx:  850  Epoch:  56  loss:  8.274655  Elapsed time:  33.36923384666443\n",
      "idx:  900  Epoch:  56  loss:  6.069996  Elapsed time:  33.56833577156067\n",
      "idx:  950  Epoch:  56  loss:  6.5867066  Elapsed time:  35.26792764663696\n",
      "idx:  1000  Epoch:  56  loss:  6.224339  Elapsed time:  34.044758796691895\n",
      "idx:  1050  Epoch:  56  loss:  6.3574195  Elapsed time:  34.19952321052551\n",
      "idx:  1100  Epoch:  56  loss:  7.643315  Elapsed time:  34.006471157073975\n",
      "idx:  1150  Epoch:  56  loss:  6.2680306  Elapsed time:  33.36691904067993\n",
      "idx:  1200  Epoch:  56  loss:  6.376846  Elapsed time:  34.01898980140686\n",
      "idx:  1250  Epoch:  56  loss:  5.624503  Elapsed time:  35.61186408996582\n",
      "idx:  1300  Epoch:  56  loss:  8.9403715  Elapsed time:  34.04236316680908\n",
      "idx:  1350  Epoch:  56  loss:  6.5538764  Elapsed time:  35.68146586418152\n",
      "idx:  1400  Epoch:  56  loss:  7.0553503  Elapsed time:  34.781081199645996\n",
      "idx:  0  Epoch:  57  loss:  8.021043  Elapsed time:  34.14365196228027\n",
      "idx:  50  Epoch:  57  loss:  6.1557345  Elapsed time:  35.72502279281616\n",
      "idx:  100  Epoch:  57  loss:  7.029457  Elapsed time:  32.72269606590271\n",
      "idx:  150  Epoch:  57  loss:  8.341565  Elapsed time:  34.711496114730835\n",
      "idx:  200  Epoch:  57  loss:  6.899977  Elapsed time:  32.624589920043945\n",
      "idx:  250  Epoch:  57  loss:  6.7485375  Elapsed time:  33.51892805099487\n",
      "idx:  300  Epoch:  57  loss:  7.887037  Elapsed time:  35.054009199142456\n",
      "idx:  350  Epoch:  57  loss:  6.763602  Elapsed time:  35.18227791786194\n",
      "idx:  400  Epoch:  57  loss:  6.493819  Elapsed time:  34.970155000686646\n",
      "idx:  450  Epoch:  57  loss:  6.9303064  Elapsed time:  32.67107582092285\n",
      "idx:  500  Epoch:  57  loss:  6.9374046  Elapsed time:  34.353068113327026\n",
      "idx:  550  Epoch:  57  loss:  5.8729506  Elapsed time:  31.819015741348267\n",
      "idx:  600  Epoch:  57  loss:  6.4882402  Elapsed time:  34.06472396850586\n",
      "idx:  650  Epoch:  57  loss:  6.561332  Elapsed time:  34.679359912872314\n",
      "idx:  700  Epoch:  57  loss:  6.297327  Elapsed time:  32.78246712684631\n",
      "idx:  750  Epoch:  57  loss:  6.3343496  Elapsed time:  36.68411898612976\n",
      "idx:  800  Epoch:  57  loss:  7.164166  Elapsed time:  32.518726110458374\n",
      "idx:  850  Epoch:  57  loss:  7.4751077  Elapsed time:  34.67882013320923\n",
      "idx:  900  Epoch:  57  loss:  6.614576  Elapsed time:  34.807546854019165\n",
      "idx:  950  Epoch:  57  loss:  7.0759525  Elapsed time:  31.62313675880432\n",
      "idx:  1000  Epoch:  57  loss:  7.269581  Elapsed time:  32.67555499076843\n",
      "idx:  1050  Epoch:  57  loss:  7.1283545  Elapsed time:  35.31255602836609\n",
      "idx:  1100  Epoch:  57  loss:  6.3682566  Elapsed time:  33.942957162857056\n",
      "idx:  1150  Epoch:  57  loss:  7.516692  Elapsed time:  35.283681869506836\n",
      "idx:  1200  Epoch:  57  loss:  6.2467504  Elapsed time:  36.58390212059021\n",
      "idx:  1250  Epoch:  57  loss:  5.2064266  Elapsed time:  30.795249938964844\n",
      "idx:  1300  Epoch:  57  loss:  7.7692695  Elapsed time:  33.331385135650635\n",
      "idx:  1350  Epoch:  57  loss:  7.364469  Elapsed time:  34.28350305557251\n",
      "idx:  1400  Epoch:  57  loss:  7.9238887  Elapsed time:  33.68416881561279\n",
      "idx:  0  Epoch:  58  loss:  6.0251775  Elapsed time:  32.334259033203125\n",
      "idx:  50  Epoch:  58  loss:  5.4577727  Elapsed time:  32.6115620136261\n",
      "idx:  100  Epoch:  58  loss:  6.30583  Elapsed time:  33.72909593582153\n",
      "idx:  150  Epoch:  58  loss:  8.091407  Elapsed time:  34.12606596946716\n",
      "idx:  200  Epoch:  58  loss:  6.09319  Elapsed time:  35.98685598373413\n",
      "idx:  250  Epoch:  58  loss:  7.2218876  Elapsed time:  34.437739849090576\n",
      "idx:  300  Epoch:  58  loss:  7.1356597  Elapsed time:  35.32535409927368\n",
      "idx:  350  Epoch:  58  loss:  6.9154444  Elapsed time:  35.388123989105225\n",
      "idx:  400  Epoch:  58  loss:  5.9334807  Elapsed time:  33.82740497589111\n",
      "idx:  450  Epoch:  58  loss:  6.995935  Elapsed time:  35.05479025840759\n",
      "idx:  500  Epoch:  58  loss:  7.4949775  Elapsed time:  35.125492095947266\n",
      "idx:  550  Epoch:  58  loss:  6.6538634  Elapsed time:  35.024352073669434\n",
      "idx:  600  Epoch:  58  loss:  6.405991  Elapsed time:  33.09601306915283\n",
      "idx:  650  Epoch:  58  loss:  5.962933  Elapsed time:  35.10616898536682\n",
      "idx:  700  Epoch:  58  loss:  7.5561466  Elapsed time:  35.50998878479004\n",
      "idx:  750  Epoch:  58  loss:  5.727126  Elapsed time:  32.6220281124115\n",
      "idx:  800  Epoch:  58  loss:  7.336829  Elapsed time:  34.44658303260803\n",
      "idx:  850  Epoch:  58  loss:  7.1592135  Elapsed time:  35.267056941986084\n",
      "idx:  900  Epoch:  58  loss:  6.011381  Elapsed time:  35.306782960891724\n",
      "idx:  950  Epoch:  58  loss:  6.5054827  Elapsed time:  36.16515302658081\n",
      "idx:  1000  Epoch:  58  loss:  7.0120544  Elapsed time:  34.82997512817383\n",
      "idx:  1050  Epoch:  58  loss:  7.4130306  Elapsed time:  35.4420690536499\n",
      "idx:  1100  Epoch:  58  loss:  6.042612  Elapsed time:  33.87821578979492\n",
      "idx:  1150  Epoch:  58  loss:  7.248591  Elapsed time:  33.75666308403015\n",
      "idx:  1200  Epoch:  58  loss:  6.347851  Elapsed time:  33.98727893829346\n",
      "idx:  1250  Epoch:  58  loss:  6.2073407  Elapsed time:  34.796536684036255\n",
      "idx:  1300  Epoch:  58  loss:  7.3137097  Elapsed time:  33.798359870910645\n",
      "idx:  1350  Epoch:  58  loss:  6.344626  Elapsed time:  34.34494686126709\n",
      "idx:  1400  Epoch:  58  loss:  7.17715  Elapsed time:  33.32756209373474\n",
      "idx:  0  Epoch:  59  loss:  6.607433  Elapsed time:  33.88052797317505\n",
      "idx:  50  Epoch:  59  loss:  6.3935657  Elapsed time:  31.64942479133606\n",
      "idx:  100  Epoch:  59  loss:  7.1373816  Elapsed time:  34.799591064453125\n",
      "idx:  150  Epoch:  59  loss:  7.713007  Elapsed time:  34.15271329879761\n",
      "idx:  200  Epoch:  59  loss:  7.3265047  Elapsed time:  35.611294984817505\n",
      "idx:  250  Epoch:  59  loss:  6.4255285  Elapsed time:  33.26012325286865\n",
      "idx:  300  Epoch:  59  loss:  6.2039433  Elapsed time:  34.641791105270386\n",
      "idx:  350  Epoch:  59  loss:  6.786324  Elapsed time:  35.324113845825195\n",
      "idx:  400  Epoch:  59  loss:  5.904587  Elapsed time:  34.1774537563324\n",
      "idx:  450  Epoch:  59  loss:  6.925731  Elapsed time:  31.921090126037598\n",
      "idx:  500  Epoch:  59  loss:  6.6725388  Elapsed time:  34.008593797683716\n",
      "idx:  550  Epoch:  59  loss:  6.9857545  Elapsed time:  34.35993790626526\n",
      "idx:  600  Epoch:  59  loss:  7.89416  Elapsed time:  36.6039879322052\n",
      "idx:  650  Epoch:  59  loss:  6.5554953  Elapsed time:  34.97435116767883\n",
      "idx:  700  Epoch:  59  loss:  6.8233457  Elapsed time:  34.20244598388672\n",
      "idx:  750  Epoch:  59  loss:  6.297098  Elapsed time:  34.6085479259491\n",
      "idx:  800  Epoch:  59  loss:  6.82667  Elapsed time:  34.9300320148468\n",
      "idx:  850  Epoch:  59  loss:  7.4138436  Elapsed time:  33.52711200714111\n",
      "idx:  900  Epoch:  59  loss:  7.0415144  Elapsed time:  33.83457374572754\n",
      "idx:  950  Epoch:  59  loss:  6.1822433  Elapsed time:  34.939085960388184\n",
      "idx:  1000  Epoch:  59  loss:  6.1822968  Elapsed time:  34.52160906791687\n",
      "idx:  1050  Epoch:  59  loss:  7.4176764  Elapsed time:  34.8030960559845\n",
      "idx:  1100  Epoch:  59  loss:  6.223231  Elapsed time:  33.444868087768555\n",
      "idx:  1150  Epoch:  59  loss:  6.082681  Elapsed time:  33.789246797561646\n",
      "idx:  1200  Epoch:  59  loss:  7.5589733  Elapsed time:  34.711804151535034\n",
      "idx:  1250  Epoch:  59  loss:  6.9175553  Elapsed time:  35.317859172821045\n",
      "idx:  1300  Epoch:  59  loss:  7.86758  Elapsed time:  34.8775417804718\n",
      "idx:  1350  Epoch:  59  loss:  6.704864  Elapsed time:  35.897435903549194\n",
      "idx:  1400  Epoch:  59  loss:  6.039066  Elapsed time:  33.36887812614441\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  0  Epoch:  60  loss:  6.4501967  Elapsed time:  33.30796217918396\n",
      "idx:  50  Epoch:  60  loss:  6.1962833  Elapsed time:  33.04367017745972\n",
      "idx:  100  Epoch:  60  loss:  6.143671  Elapsed time:  33.690205097198486\n",
      "idx:  150  Epoch:  60  loss:  7.440846  Elapsed time:  34.19418907165527\n",
      "idx:  200  Epoch:  60  loss:  6.5026946  Elapsed time:  34.94851112365723\n",
      "idx:  250  Epoch:  60  loss:  5.963957  Elapsed time:  34.26695513725281\n",
      "idx:  300  Epoch:  60  loss:  7.1238704  Elapsed time:  35.01620292663574\n",
      "idx:  350  Epoch:  60  loss:  6.637897  Elapsed time:  33.869121074676514\n",
      "idx:  400  Epoch:  60  loss:  6.206536  Elapsed time:  33.64252686500549\n",
      "idx:  450  Epoch:  60  loss:  6.8264346  Elapsed time:  32.592897176742554\n",
      "idx:  500  Epoch:  60  loss:  7.505416  Elapsed time:  33.58396077156067\n",
      "idx:  550  Epoch:  60  loss:  7.4454675  Elapsed time:  34.44843888282776\n",
      "idx:  600  Epoch:  60  loss:  6.8989077  Elapsed time:  34.11693096160889\n",
      "idx:  650  Epoch:  60  loss:  6.2253513  Elapsed time:  34.39188003540039\n",
      "idx:  700  Epoch:  60  loss:  6.062462  Elapsed time:  32.93792915344238\n",
      "idx:  750  Epoch:  60  loss:  6.518366  Elapsed time:  33.84354281425476\n",
      "idx:  800  Epoch:  60  loss:  6.3470416  Elapsed time:  33.14041519165039\n",
      "idx:  850  Epoch:  60  loss:  6.974129  Elapsed time:  34.55100107192993\n",
      "idx:  900  Epoch:  60  loss:  5.6438193  Elapsed time:  34.493170976638794\n",
      "idx:  950  Epoch:  60  loss:  6.7051473  Elapsed time:  34.117464780807495\n",
      "idx:  1000  Epoch:  60  loss:  6.325725  Elapsed time:  35.6240770816803\n",
      "idx:  1050  Epoch:  60  loss:  7.0086083  Elapsed time:  35.90250515937805\n",
      "idx:  1100  Epoch:  60  loss:  7.2341113  Elapsed time:  33.97684621810913\n",
      "idx:  1150  Epoch:  60  loss:  6.371397  Elapsed time:  34.24180507659912\n",
      "idx:  1200  Epoch:  60  loss:  7.1601257  Elapsed time:  35.15550208091736\n",
      "idx:  1250  Epoch:  60  loss:  5.8756995  Elapsed time:  34.682353258132935\n",
      "idx:  1300  Epoch:  60  loss:  6.901783  Elapsed time:  34.80051112174988\n",
      "idx:  1350  Epoch:  60  loss:  6.1949935  Elapsed time:  33.29454779624939\n",
      "idx:  1400  Epoch:  60  loss:  5.5186434  Elapsed time:  33.69644904136658\n",
      "Epoch  60  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n",
      "idx:  0  Epoch:  61  loss:  5.9037924  Elapsed time:  34.94949388504028\n",
      "idx:  50  Epoch:  61  loss:  5.580737  Elapsed time:  32.61970496177673\n",
      "idx:  100  Epoch:  61  loss:  7.1182947  Elapsed time:  35.58381009101868\n",
      "idx:  150  Epoch:  61  loss:  6.709081  Elapsed time:  35.64822816848755\n",
      "idx:  200  Epoch:  61  loss:  6.3249784  Elapsed time:  33.02052903175354\n",
      "idx:  250  Epoch:  61  loss:  6.7145724  Elapsed time:  35.77226686477661\n",
      "idx:  300  Epoch:  61  loss:  8.125005  Elapsed time:  35.378820180892944\n",
      "idx:  350  Epoch:  61  loss:  6.2896934  Elapsed time:  35.63690114021301\n",
      "idx:  400  Epoch:  61  loss:  6.057854  Elapsed time:  35.67271113395691\n",
      "idx:  450  Epoch:  61  loss:  6.027695  Elapsed time:  35.38136911392212\n",
      "idx:  500  Epoch:  61  loss:  6.4881783  Elapsed time:  34.10700869560242\n",
      "idx:  550  Epoch:  61  loss:  5.7219286  Elapsed time:  35.24458408355713\n",
      "idx:  600  Epoch:  61  loss:  7.2038054  Elapsed time:  36.12351584434509\n",
      "idx:  650  Epoch:  61  loss:  5.9639587  Elapsed time:  35.3719642162323\n",
      "idx:  700  Epoch:  61  loss:  7.7259674  Elapsed time:  32.98853921890259\n",
      "idx:  750  Epoch:  61  loss:  5.9209266  Elapsed time:  34.508166790008545\n",
      "idx:  800  Epoch:  61  loss:  6.932199  Elapsed time:  34.76990604400635\n",
      "idx:  850  Epoch:  61  loss:  6.9854965  Elapsed time:  36.65310478210449\n",
      "idx:  900  Epoch:  61  loss:  7.553639  Elapsed time:  34.63257718086243\n",
      "idx:  950  Epoch:  61  loss:  7.754663  Elapsed time:  34.255626916885376\n",
      "idx:  1000  Epoch:  61  loss:  6.4330063  Elapsed time:  36.5357129573822\n",
      "idx:  1050  Epoch:  61  loss:  6.2904572  Elapsed time:  34.438241958618164\n",
      "idx:  1100  Epoch:  61  loss:  6.0632186  Elapsed time:  34.81504487991333\n",
      "idx:  1150  Epoch:  61  loss:  7.5320177  Elapsed time:  34.53943920135498\n",
      "idx:  1200  Epoch:  61  loss:  7.4332175  Elapsed time:  32.49903225898743\n",
      "idx:  1250  Epoch:  61  loss:  5.776652  Elapsed time:  36.94641709327698\n",
      "idx:  1300  Epoch:  61  loss:  7.7699747  Elapsed time:  34.718003034591675\n",
      "idx:  1350  Epoch:  61  loss:  7.3367887  Elapsed time:  35.82950568199158\n",
      "idx:  1400  Epoch:  61  loss:  6.396837  Elapsed time:  33.05195498466492\n",
      "idx:  0  Epoch:  62  loss:  7.253681  Elapsed time:  34.89705014228821\n",
      "idx:  50  Epoch:  62  loss:  5.94492  Elapsed time:  34.764174938201904\n",
      "idx:  100  Epoch:  62  loss:  6.550836  Elapsed time:  35.207826137542725\n",
      "idx:  150  Epoch:  62  loss:  7.2668176  Elapsed time:  34.391979932785034\n",
      "idx:  200  Epoch:  62  loss:  6.6465497  Elapsed time:  34.84719514846802\n",
      "idx:  250  Epoch:  62  loss:  7.491539  Elapsed time:  33.30348587036133\n",
      "idx:  300  Epoch:  62  loss:  6.1089907  Elapsed time:  34.52177309989929\n",
      "idx:  350  Epoch:  62  loss:  6.149847  Elapsed time:  34.86241602897644\n",
      "idx:  400  Epoch:  62  loss:  6.7630467  Elapsed time:  33.93415307998657\n",
      "idx:  450  Epoch:  62  loss:  5.389797  Elapsed time:  34.35681104660034\n",
      "idx:  500  Epoch:  62  loss:  7.0205097  Elapsed time:  34.34903907775879\n",
      "idx:  550  Epoch:  62  loss:  6.656998  Elapsed time:  34.29554486274719\n",
      "idx:  600  Epoch:  62  loss:  8.721056  Elapsed time:  34.884366273880005\n",
      "idx:  650  Epoch:  62  loss:  6.239502  Elapsed time:  34.61177921295166\n",
      "idx:  700  Epoch:  62  loss:  5.9379306  Elapsed time:  34.315176010131836\n",
      "idx:  750  Epoch:  62  loss:  6.7753363  Elapsed time:  35.04792094230652\n",
      "idx:  800  Epoch:  62  loss:  6.456333  Elapsed time:  34.57992076873779\n",
      "idx:  850  Epoch:  62  loss:  7.6933665  Elapsed time:  35.86915421485901\n",
      "idx:  900  Epoch:  62  loss:  7.1012435  Elapsed time:  35.50393581390381\n",
      "idx:  950  Epoch:  62  loss:  6.9725003  Elapsed time:  33.81295680999756\n",
      "idx:  1000  Epoch:  62  loss:  6.043398  Elapsed time:  33.760032176971436\n",
      "idx:  1050  Epoch:  62  loss:  5.873707  Elapsed time:  32.46299910545349\n",
      "idx:  1100  Epoch:  62  loss:  6.2726994  Elapsed time:  33.80559802055359\n",
      "idx:  1150  Epoch:  62  loss:  6.5517597  Elapsed time:  34.112096071243286\n",
      "idx:  1200  Epoch:  62  loss:  7.0760922  Elapsed time:  34.69214415550232\n",
      "idx:  1250  Epoch:  62  loss:  6.6365895  Elapsed time:  34.939486026763916\n",
      "idx:  1300  Epoch:  62  loss:  7.1296415  Elapsed time:  34.240375995635986\n",
      "idx:  1350  Epoch:  62  loss:  7.1813703  Elapsed time:  35.77332615852356\n",
      "idx:  1400  Epoch:  62  loss:  6.535323  Elapsed time:  34.49575614929199\n",
      "idx:  0  Epoch:  63  loss:  6.7491884  Elapsed time:  34.545316219329834\n",
      "idx:  50  Epoch:  63  loss:  6.3060765  Elapsed time:  33.80767893791199\n",
      "idx:  100  Epoch:  63  loss:  6.793948  Elapsed time:  34.17816114425659\n",
      "idx:  150  Epoch:  63  loss:  6.301652  Elapsed time:  35.48624587059021\n",
      "idx:  200  Epoch:  63  loss:  6.0103297  Elapsed time:  34.90282988548279\n",
      "idx:  250  Epoch:  63  loss:  7.5703707  Elapsed time:  33.83680295944214\n",
      "idx:  300  Epoch:  63  loss:  7.076441  Elapsed time:  34.936822175979614\n",
      "idx:  350  Epoch:  63  loss:  6.277989  Elapsed time:  35.65441370010376\n",
      "idx:  400  Epoch:  63  loss:  6.1678505  Elapsed time:  35.49583101272583\n",
      "idx:  450  Epoch:  63  loss:  7.0114627  Elapsed time:  33.72438979148865\n",
      "idx:  500  Epoch:  63  loss:  5.910108  Elapsed time:  34.90185618400574\n",
      "idx:  550  Epoch:  63  loss:  6.7441454  Elapsed time:  35.118175983428955\n",
      "idx:  600  Epoch:  63  loss:  7.0205894  Elapsed time:  33.61696171760559\n",
      "idx:  650  Epoch:  63  loss:  6.868777  Elapsed time:  33.96631097793579\n",
      "idx:  700  Epoch:  63  loss:  7.228394  Elapsed time:  34.71240592002869\n",
      "idx:  750  Epoch:  63  loss:  5.623507  Elapsed time:  34.10432004928589\n",
      "idx:  800  Epoch:  63  loss:  5.932478  Elapsed time:  32.565399169921875\n",
      "idx:  850  Epoch:  63  loss:  7.2143135  Elapsed time:  35.181161880493164\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  900  Epoch:  63  loss:  5.6665635  Elapsed time:  33.77094602584839\n",
      "idx:  950  Epoch:  63  loss:  5.956678  Elapsed time:  34.615824699401855\n",
      "idx:  1000  Epoch:  63  loss:  6.814145  Elapsed time:  34.40640902519226\n",
      "idx:  1050  Epoch:  63  loss:  7.4394274  Elapsed time:  35.483978033065796\n",
      "idx:  1100  Epoch:  63  loss:  5.6109395  Elapsed time:  33.05728602409363\n",
      "idx:  1150  Epoch:  63  loss:  6.646125  Elapsed time:  33.576059341430664\n",
      "idx:  1200  Epoch:  63  loss:  6.6962185  Elapsed time:  34.519081115722656\n",
      "idx:  1250  Epoch:  63  loss:  6.6625576  Elapsed time:  34.96235108375549\n",
      "idx:  1300  Epoch:  63  loss:  6.7227054  Elapsed time:  34.62621593475342\n",
      "idx:  1350  Epoch:  63  loss:  6.0628495  Elapsed time:  34.96719288825989\n",
      "idx:  1400  Epoch:  63  loss:  7.25183  Elapsed time:  34.372459173202515\n",
      "idx:  0  Epoch:  64  loss:  5.5740557  Elapsed time:  35.925798177719116\n",
      "idx:  50  Epoch:  64  loss:  5.120302  Elapsed time:  33.52098608016968\n",
      "idx:  100  Epoch:  64  loss:  6.504861  Elapsed time:  34.86063599586487\n",
      "idx:  150  Epoch:  64  loss:  6.5848556  Elapsed time:  35.094300985336304\n",
      "idx:  200  Epoch:  64  loss:  7.3277125  Elapsed time:  34.09947896003723\n",
      "idx:  250  Epoch:  64  loss:  6.3886256  Elapsed time:  34.07836079597473\n",
      "idx:  300  Epoch:  64  loss:  6.91147  Elapsed time:  34.9244339466095\n",
      "idx:  350  Epoch:  64  loss:  5.879178  Elapsed time:  33.866389751434326\n",
      "idx:  400  Epoch:  64  loss:  7.5204473  Elapsed time:  36.12937784194946\n",
      "idx:  450  Epoch:  64  loss:  5.797769  Elapsed time:  34.468873023986816\n",
      "idx:  500  Epoch:  64  loss:  7.8492017  Elapsed time:  33.833847999572754\n",
      "idx:  550  Epoch:  64  loss:  5.9486537  Elapsed time:  33.69984698295593\n",
      "idx:  600  Epoch:  64  loss:  6.3922935  Elapsed time:  34.330044746398926\n",
      "idx:  650  Epoch:  64  loss:  5.8179355  Elapsed time:  36.96886706352234\n",
      "idx:  700  Epoch:  64  loss:  6.4147816  Elapsed time:  34.31533193588257\n",
      "idx:  750  Epoch:  64  loss:  6.1469493  Elapsed time:  33.080446004867554\n",
      "idx:  800  Epoch:  64  loss:  6.2426453  Elapsed time:  35.27597427368164\n",
      "idx:  850  Epoch:  64  loss:  6.5508165  Elapsed time:  31.336857080459595\n",
      "idx:  900  Epoch:  64  loss:  6.529434  Elapsed time:  35.15582489967346\n",
      "idx:  950  Epoch:  64  loss:  6.2000904  Elapsed time:  34.28548288345337\n",
      "idx:  1000  Epoch:  64  loss:  5.360543  Elapsed time:  33.7544960975647\n",
      "idx:  1050  Epoch:  64  loss:  6.1542535  Elapsed time:  34.73722314834595\n",
      "idx:  1100  Epoch:  64  loss:  5.310144  Elapsed time:  33.7723388671875\n",
      "idx:  1150  Epoch:  64  loss:  7.142884  Elapsed time:  34.850908041000366\n",
      "idx:  1200  Epoch:  64  loss:  7.3627133  Elapsed time:  35.1629159450531\n",
      "idx:  1250  Epoch:  64  loss:  7.0884194  Elapsed time:  35.116355180740356\n",
      "idx:  1300  Epoch:  64  loss:  7.4382057  Elapsed time:  34.178146839141846\n",
      "idx:  1350  Epoch:  64  loss:  7.6483192  Elapsed time:  34.66515398025513\n",
      "idx:  1400  Epoch:  64  loss:  6.35433  Elapsed time:  33.51566481590271\n",
      "idx:  0  Epoch:  65  loss:  6.7462134  Elapsed time:  34.71870303153992\n",
      "idx:  50  Epoch:  65  loss:  6.4282656  Elapsed time:  35.65058517456055\n",
      "idx:  100  Epoch:  65  loss:  6.741499  Elapsed time:  34.98734211921692\n",
      "idx:  150  Epoch:  65  loss:  6.5816135  Elapsed time:  34.39049005508423\n",
      "idx:  200  Epoch:  65  loss:  7.514566  Elapsed time:  34.63221001625061\n",
      "idx:  250  Epoch:  65  loss:  6.0163155  Elapsed time:  33.66286492347717\n",
      "idx:  300  Epoch:  65  loss:  6.7285814  Elapsed time:  35.03254222869873\n",
      "idx:  350  Epoch:  65  loss:  5.7229724  Elapsed time:  34.38526105880737\n",
      "idx:  400  Epoch:  65  loss:  6.7656994  Elapsed time:  33.20329999923706\n",
      "idx:  450  Epoch:  65  loss:  6.2402844  Elapsed time:  35.54790019989014\n",
      "idx:  500  Epoch:  65  loss:  7.0286217  Elapsed time:  34.211111068725586\n",
      "idx:  550  Epoch:  65  loss:  5.8557243  Elapsed time:  35.47993206977844\n",
      "idx:  600  Epoch:  65  loss:  7.0046153  Elapsed time:  34.53615999221802\n",
      "idx:  650  Epoch:  65  loss:  7.005433  Elapsed time:  34.9865517616272\n",
      "idx:  700  Epoch:  65  loss:  5.4877067  Elapsed time:  34.98795700073242\n",
      "idx:  750  Epoch:  65  loss:  6.4461384  Elapsed time:  34.46684503555298\n",
      "idx:  800  Epoch:  65  loss:  6.3111763  Elapsed time:  31.88205885887146\n",
      "idx:  850  Epoch:  65  loss:  5.7517157  Elapsed time:  34.57875609397888\n",
      "idx:  900  Epoch:  65  loss:  6.96652  Elapsed time:  35.75282406806946\n",
      "idx:  950  Epoch:  65  loss:  6.1192164  Elapsed time:  32.26974892616272\n",
      "idx:  1000  Epoch:  65  loss:  6.010688  Elapsed time:  33.612940073013306\n",
      "idx:  1050  Epoch:  65  loss:  7.4453235  Elapsed time:  35.3339581489563\n",
      "idx:  1100  Epoch:  65  loss:  7.5828266  Elapsed time:  34.63495111465454\n",
      "idx:  1150  Epoch:  65  loss:  7.0898447  Elapsed time:  35.65084791183472\n",
      "idx:  1200  Epoch:  65  loss:  6.2070365  Elapsed time:  35.16951107978821\n",
      "idx:  1250  Epoch:  65  loss:  6.2773957  Elapsed time:  33.22025108337402\n",
      "idx:  1300  Epoch:  65  loss:  6.3372617  Elapsed time:  33.374178886413574\n",
      "idx:  1350  Epoch:  65  loss:  6.7077794  Elapsed time:  31.693561792373657\n",
      "idx:  1400  Epoch:  65  loss:  6.334454  Elapsed time:  31.309988975524902\n",
      "idx:  0  Epoch:  66  loss:  7.0153046  Elapsed time:  35.004619121551514\n",
      "idx:  50  Epoch:  66  loss:  6.014342  Elapsed time:  34.08620595932007\n",
      "idx:  100  Epoch:  66  loss:  6.4889064  Elapsed time:  35.78003692626953\n",
      "idx:  150  Epoch:  66  loss:  7.357244  Elapsed time:  31.948755025863647\n",
      "idx:  200  Epoch:  66  loss:  5.815935  Elapsed time:  34.71081900596619\n",
      "idx:  250  Epoch:  66  loss:  6.600721  Elapsed time:  34.91982364654541\n",
      "idx:  300  Epoch:  66  loss:  6.74873  Elapsed time:  35.559852838516235\n",
      "idx:  350  Epoch:  66  loss:  6.45042  Elapsed time:  35.780959129333496\n",
      "idx:  400  Epoch:  66  loss:  5.889813  Elapsed time:  33.783276081085205\n",
      "idx:  450  Epoch:  66  loss:  6.889572  Elapsed time:  33.83590602874756\n",
      "idx:  500  Epoch:  66  loss:  7.3047915  Elapsed time:  35.31991505622864\n",
      "idx:  550  Epoch:  66  loss:  6.915869  Elapsed time:  34.09754681587219\n",
      "idx:  600  Epoch:  66  loss:  6.992122  Elapsed time:  33.917460918426514\n",
      "idx:  650  Epoch:  66  loss:  6.815068  Elapsed time:  32.70482110977173\n",
      "idx:  700  Epoch:  66  loss:  6.4122105  Elapsed time:  35.034850120544434\n",
      "idx:  750  Epoch:  66  loss:  6.191134  Elapsed time:  34.29528021812439\n",
      "idx:  800  Epoch:  66  loss:  7.1466236  Elapsed time:  34.062625885009766\n",
      "idx:  850  Epoch:  66  loss:  7.2927613  Elapsed time:  34.176613092422485\n",
      "idx:  900  Epoch:  66  loss:  7.131389  Elapsed time:  34.68322396278381\n",
      "idx:  950  Epoch:  66  loss:  6.840343  Elapsed time:  34.91339421272278\n",
      "idx:  1000  Epoch:  66  loss:  7.2133865  Elapsed time:  33.74044108390808\n",
      "idx:  1050  Epoch:  66  loss:  6.832763  Elapsed time:  33.05462193489075\n",
      "idx:  1100  Epoch:  66  loss:  5.168924  Elapsed time:  34.40810012817383\n",
      "idx:  1150  Epoch:  66  loss:  6.3202147  Elapsed time:  34.491108655929565\n",
      "idx:  1200  Epoch:  66  loss:  7.3565116  Elapsed time:  34.82779502868652\n",
      "idx:  1250  Epoch:  66  loss:  6.3066015  Elapsed time:  33.845948934555054\n",
      "idx:  1300  Epoch:  66  loss:  6.255387  Elapsed time:  32.758389949798584\n",
      "idx:  1350  Epoch:  66  loss:  6.3942127  Elapsed time:  35.202884912490845\n",
      "idx:  1400  Epoch:  66  loss:  6.0994506  Elapsed time:  35.36144709587097\n",
      "idx:  0  Epoch:  67  loss:  6.277628  Elapsed time:  33.859119176864624\n",
      "idx:  50  Epoch:  67  loss:  6.435427  Elapsed time:  34.55252504348755\n",
      "idx:  100  Epoch:  67  loss:  6.613622  Elapsed time:  34.16889786720276\n",
      "idx:  150  Epoch:  67  loss:  7.7540007  Elapsed time:  32.98204326629639\n",
      "idx:  200  Epoch:  67  loss:  6.154001  Elapsed time:  33.97397804260254\n",
      "idx:  250  Epoch:  67  loss:  6.0260744  Elapsed time:  35.51287388801575\n",
      "idx:  300  Epoch:  67  loss:  6.228655  Elapsed time:  34.85106921195984\n",
      "idx:  350  Epoch:  67  loss:  6.5387053  Elapsed time:  35.01725387573242\n",
      "idx:  400  Epoch:  67  loss:  6.518815  Elapsed time:  34.9833779335022\n",
      "idx:  450  Epoch:  67  loss:  5.5690527  Elapsed time:  34.47584891319275\n",
      "idx:  500  Epoch:  67  loss:  6.873263  Elapsed time:  34.97952890396118\n",
      "idx:  550  Epoch:  67  loss:  7.3379936  Elapsed time:  33.89187002182007\n",
      "idx:  600  Epoch:  67  loss:  6.7543964  Elapsed time:  33.26977300643921\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  650  Epoch:  67  loss:  6.138926  Elapsed time:  35.14009094238281\n",
      "idx:  700  Epoch:  67  loss:  5.588706  Elapsed time:  34.96748900413513\n",
      "idx:  750  Epoch:  67  loss:  5.4168496  Elapsed time:  34.86040115356445\n",
      "idx:  800  Epoch:  67  loss:  7.110188  Elapsed time:  34.12842392921448\n",
      "idx:  850  Epoch:  67  loss:  7.5742245  Elapsed time:  32.00515079498291\n",
      "idx:  900  Epoch:  67  loss:  6.477352  Elapsed time:  34.80262804031372\n",
      "idx:  950  Epoch:  67  loss:  7.2134066  Elapsed time:  35.65200209617615\n",
      "idx:  1000  Epoch:  67  loss:  6.930642  Elapsed time:  34.38363718986511\n",
      "idx:  1050  Epoch:  67  loss:  7.059993  Elapsed time:  33.174290895462036\n",
      "idx:  1100  Epoch:  67  loss:  7.44833  Elapsed time:  34.82588219642639\n",
      "idx:  1150  Epoch:  67  loss:  6.822374  Elapsed time:  34.377108097076416\n",
      "idx:  1200  Epoch:  67  loss:  6.8331294  Elapsed time:  35.82673716545105\n",
      "idx:  1250  Epoch:  67  loss:  6.57009  Elapsed time:  35.24380803108215\n",
      "idx:  1300  Epoch:  67  loss:  6.7689342  Elapsed time:  35.2552330493927\n",
      "idx:  1350  Epoch:  67  loss:  7.433188  Elapsed time:  35.93587589263916\n",
      "idx:  1400  Epoch:  67  loss:  6.014695  Elapsed time:  32.9137909412384\n",
      "idx:  0  Epoch:  68  loss:  6.6467457  Elapsed time:  34.541053771972656\n",
      "idx:  50  Epoch:  68  loss:  6.472594  Elapsed time:  35.79787087440491\n",
      "idx:  100  Epoch:  68  loss:  7.672813  Elapsed time:  33.5030300617218\n",
      "idx:  150  Epoch:  68  loss:  5.8605466  Elapsed time:  34.314313888549805\n",
      "idx:  200  Epoch:  68  loss:  6.114051  Elapsed time:  33.62251925468445\n",
      "idx:  250  Epoch:  68  loss:  5.9413037  Elapsed time:  33.68291783332825\n",
      "idx:  300  Epoch:  68  loss:  7.177329  Elapsed time:  32.02715802192688\n",
      "idx:  350  Epoch:  68  loss:  6.2617216  Elapsed time:  33.81073307991028\n",
      "idx:  400  Epoch:  68  loss:  5.594839  Elapsed time:  32.262624979019165\n",
      "idx:  450  Epoch:  68  loss:  7.7338557  Elapsed time:  33.661766052246094\n",
      "idx:  500  Epoch:  68  loss:  7.1275463  Elapsed time:  35.72881603240967\n",
      "idx:  550  Epoch:  68  loss:  6.148244  Elapsed time:  34.698758125305176\n",
      "idx:  600  Epoch:  68  loss:  6.4831295  Elapsed time:  34.46994996070862\n",
      "idx:  650  Epoch:  68  loss:  7.2266264  Elapsed time:  34.1531400680542\n",
      "idx:  700  Epoch:  68  loss:  7.0217137  Elapsed time:  33.30914115905762\n",
      "idx:  750  Epoch:  68  loss:  6.9635725  Elapsed time:  34.68199300765991\n",
      "idx:  800  Epoch:  68  loss:  6.808337  Elapsed time:  33.13753795623779\n",
      "idx:  850  Epoch:  68  loss:  7.7643127  Elapsed time:  34.26216506958008\n",
      "idx:  900  Epoch:  68  loss:  5.9713445  Elapsed time:  34.3808069229126\n",
      "idx:  950  Epoch:  68  loss:  8.363935  Elapsed time:  34.51182723045349\n",
      "idx:  1000  Epoch:  68  loss:  6.533965  Elapsed time:  33.13464689254761\n",
      "idx:  1050  Epoch:  68  loss:  6.4535465  Elapsed time:  32.92330503463745\n",
      "idx:  1100  Epoch:  68  loss:  6.611975  Elapsed time:  34.150768756866455\n",
      "idx:  1150  Epoch:  68  loss:  5.8888574  Elapsed time:  33.8810601234436\n",
      "idx:  1200  Epoch:  68  loss:  7.1293364  Elapsed time:  32.191953897476196\n",
      "idx:  1250  Epoch:  68  loss:  5.4285827  Elapsed time:  34.72270083427429\n",
      "idx:  1300  Epoch:  68  loss:  5.5656834  Elapsed time:  35.75915288925171\n",
      "idx:  1350  Epoch:  68  loss:  6.4382133  Elapsed time:  33.9128360748291\n",
      "idx:  1400  Epoch:  68  loss:  5.949463  Elapsed time:  34.67006301879883\n",
      "idx:  0  Epoch:  69  loss:  5.5245557  Elapsed time:  35.623607873916626\n",
      "idx:  50  Epoch:  69  loss:  6.9301677  Elapsed time:  35.39724540710449\n",
      "idx:  100  Epoch:  69  loss:  6.131623  Elapsed time:  35.06672692298889\n",
      "idx:  150  Epoch:  69  loss:  6.6558948  Elapsed time:  32.01273202896118\n",
      "idx:  200  Epoch:  69  loss:  5.713754  Elapsed time:  33.38705086708069\n",
      "idx:  250  Epoch:  69  loss:  6.5816727  Elapsed time:  32.41038370132446\n",
      "idx:  300  Epoch:  69  loss:  6.8717337  Elapsed time:  33.53927302360535\n",
      "idx:  350  Epoch:  69  loss:  7.065457  Elapsed time:  33.733415842056274\n",
      "idx:  400  Epoch:  69  loss:  5.680803  Elapsed time:  31.867396116256714\n",
      "idx:  450  Epoch:  69  loss:  7.7583094  Elapsed time:  34.857736110687256\n",
      "idx:  500  Epoch:  69  loss:  6.5958076  Elapsed time:  34.3555908203125\n",
      "idx:  550  Epoch:  69  loss:  6.0240855  Elapsed time:  35.7729058265686\n",
      "idx:  600  Epoch:  69  loss:  7.339223  Elapsed time:  33.02948212623596\n",
      "idx:  650  Epoch:  69  loss:  7.102438  Elapsed time:  34.472424030303955\n",
      "idx:  700  Epoch:  69  loss:  6.4467645  Elapsed time:  36.980841875076294\n",
      "idx:  750  Epoch:  69  loss:  6.7262096  Elapsed time:  35.101162910461426\n",
      "idx:  800  Epoch:  69  loss:  7.6380672  Elapsed time:  32.37197804450989\n",
      "idx:  850  Epoch:  69  loss:  6.9818673  Elapsed time:  33.88759183883667\n",
      "idx:  900  Epoch:  69  loss:  6.2820044  Elapsed time:  34.364567041397095\n",
      "idx:  950  Epoch:  69  loss:  6.2380676  Elapsed time:  34.83210611343384\n",
      "idx:  1000  Epoch:  69  loss:  6.432465  Elapsed time:  33.03149604797363\n",
      "idx:  1050  Epoch:  69  loss:  6.9830475  Elapsed time:  32.665817975997925\n",
      "idx:  1100  Epoch:  69  loss:  6.866566  Elapsed time:  34.27073693275452\n",
      "idx:  1150  Epoch:  69  loss:  6.6978397  Elapsed time:  33.476083755493164\n",
      "idx:  1200  Epoch:  69  loss:  6.8143916  Elapsed time:  35.510287046432495\n",
      "idx:  1250  Epoch:  69  loss:  7.1360173  Elapsed time:  36.140925884246826\n",
      "idx:  1300  Epoch:  69  loss:  6.7197614  Elapsed time:  35.66818714141846\n",
      "idx:  1350  Epoch:  69  loss:  5.987009  Elapsed time:  34.44851088523865\n",
      "idx:  1400  Epoch:  69  loss:  6.347415  Elapsed time:  34.66374611854553\n",
      "idx:  0  Epoch:  70  loss:  7.6454644  Elapsed time:  32.6066689491272\n",
      "idx:  50  Epoch:  70  loss:  6.3540215  Elapsed time:  35.0766179561615\n",
      "idx:  100  Epoch:  70  loss:  6.9010186  Elapsed time:  33.54958891868591\n",
      "idx:  150  Epoch:  70  loss:  6.824935  Elapsed time:  36.511168003082275\n",
      "idx:  200  Epoch:  70  loss:  6.9676514  Elapsed time:  33.946638107299805\n",
      "idx:  250  Epoch:  70  loss:  6.262012  Elapsed time:  32.84141278266907\n",
      "idx:  300  Epoch:  70  loss:  7.64074  Elapsed time:  35.330562114715576\n",
      "idx:  350  Epoch:  70  loss:  5.9870877  Elapsed time:  34.416239976882935\n",
      "idx:  400  Epoch:  70  loss:  7.561459  Elapsed time:  33.20356202125549\n",
      "idx:  450  Epoch:  70  loss:  6.9059615  Elapsed time:  34.3469820022583\n",
      "idx:  500  Epoch:  70  loss:  6.948946  Elapsed time:  34.46165919303894\n",
      "idx:  550  Epoch:  70  loss:  7.051054  Elapsed time:  34.42880988121033\n",
      "idx:  600  Epoch:  70  loss:  6.4400544  Elapsed time:  33.75738310813904\n",
      "idx:  650  Epoch:  70  loss:  6.117447  Elapsed time:  35.87290000915527\n",
      "idx:  700  Epoch:  70  loss:  5.9737186  Elapsed time:  34.67068910598755\n",
      "idx:  750  Epoch:  70  loss:  6.764324  Elapsed time:  34.473490953445435\n",
      "idx:  800  Epoch:  70  loss:  8.445552  Elapsed time:  34.12556529045105\n",
      "idx:  850  Epoch:  70  loss:  6.753857  Elapsed time:  34.55965495109558\n",
      "idx:  900  Epoch:  70  loss:  5.2918344  Elapsed time:  35.06251502037048\n",
      "idx:  950  Epoch:  70  loss:  5.996718  Elapsed time:  34.93159294128418\n",
      "idx:  1000  Epoch:  70  loss:  5.9089336  Elapsed time:  34.66978907585144\n",
      "idx:  1050  Epoch:  70  loss:  6.6180964  Elapsed time:  33.734596252441406\n",
      "idx:  1100  Epoch:  70  loss:  5.5312715  Elapsed time:  33.26064896583557\n",
      "idx:  1150  Epoch:  70  loss:  7.2609363  Elapsed time:  35.22933793067932\n",
      "idx:  1200  Epoch:  70  loss:  6.694785  Elapsed time:  34.9668288230896\n",
      "idx:  1250  Epoch:  70  loss:  5.8163586  Elapsed time:  33.66194725036621\n",
      "idx:  1300  Epoch:  70  loss:  6.1063695  Elapsed time:  34.51512813568115\n",
      "idx:  1350  Epoch:  70  loss:  6.634676  Elapsed time:  33.36472177505493\n",
      "idx:  1400  Epoch:  70  loss:  5.500039  Elapsed time:  32.16410803794861\n",
      "Epoch  70  is done. Saving the model ...\n",
      "WARNING:tensorflow:*******************************************************\n",
      "WARNING:tensorflow:TensorFlow's V1 checkpoint format has been deprecated.\n",
      "WARNING:tensorflow:Consider switching to the more efficient V2 format:\n",
      "WARNING:tensorflow:   `tf.train.Saver(write_version=tf.train.SaverDef.V2)`\n",
      "WARNING:tensorflow:now on by default.\n",
      "WARNING:tensorflow:*******************************************************\n",
      "idx:  0  Epoch:  71  loss:  6.006737  Elapsed time:  32.8359649181366\n",
      "idx:  50  Epoch:  71  loss:  6.689476  Elapsed time:  34.152215003967285\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  100  Epoch:  71  loss:  6.4917636  Elapsed time:  33.648979902267456\n",
      "idx:  150  Epoch:  71  loss:  6.497846  Elapsed time:  33.6611750125885\n",
      "idx:  200  Epoch:  71  loss:  8.194492  Elapsed time:  32.08941173553467\n",
      "idx:  250  Epoch:  71  loss:  6.825038  Elapsed time:  32.09963798522949\n",
      "idx:  300  Epoch:  71  loss:  5.973546  Elapsed time:  35.100630044937134\n",
      "idx:  350  Epoch:  71  loss:  5.987597  Elapsed time:  33.579784870147705\n",
      "idx:  400  Epoch:  71  loss:  6.418503  Elapsed time:  34.16338133811951\n",
      "idx:  450  Epoch:  71  loss:  6.974238  Elapsed time:  33.72610282897949\n",
      "idx:  500  Epoch:  71  loss:  7.642157  Elapsed time:  34.15856719017029\n",
      "idx:  550  Epoch:  71  loss:  5.738751  Elapsed time:  34.615533113479614\n",
      "idx:  600  Epoch:  71  loss:  7.058396  Elapsed time:  31.540287971496582\n",
      "idx:  650  Epoch:  71  loss:  6.5017233  Elapsed time:  34.6642210483551\n",
      "idx:  700  Epoch:  71  loss:  5.683186  Elapsed time:  32.48692297935486\n",
      "idx:  750  Epoch:  71  loss:  5.842177  Elapsed time:  31.35734724998474\n",
      "idx:  800  Epoch:  71  loss:  7.4958043  Elapsed time:  34.913294076919556\n",
      "idx:  850  Epoch:  71  loss:  6.917177  Elapsed time:  34.085932970047\n",
      "idx:  900  Epoch:  71  loss:  6.4014463  Elapsed time:  34.0834801197052\n",
      "idx:  950  Epoch:  71  loss:  7.435401  Elapsed time:  35.260578870773315\n",
      "idx:  1000  Epoch:  71  loss:  6.122747  Elapsed time:  32.09011912345886\n",
      "idx:  1050  Epoch:  71  loss:  6.4619155  Elapsed time:  34.93828010559082\n",
      "idx:  1100  Epoch:  71  loss:  6.004932  Elapsed time:  33.26328992843628\n",
      "idx:  1150  Epoch:  71  loss:  6.629562  Elapsed time:  35.50670075416565\n",
      "idx:  1200  Epoch:  71  loss:  6.7874737  Elapsed time:  34.619741916656494\n",
      "idx:  1250  Epoch:  71  loss:  6.2931104  Elapsed time:  33.889025926589966\n",
      "idx:  1300  Epoch:  71  loss:  6.6132197  Elapsed time:  34.81878590583801\n",
      "idx:  1350  Epoch:  71  loss:  7.1269755  Elapsed time:  34.94573402404785\n",
      "idx:  1400  Epoch:  71  loss:  6.1502924  Elapsed time:  33.025973081588745\n",
      "idx:  0  Epoch:  72  loss:  6.4797983  Elapsed time:  35.16358017921448\n",
      "idx:  50  Epoch:  72  loss:  6.7437744  Elapsed time:  34.24736404418945\n",
      "idx:  100  Epoch:  72  loss:  6.314807  Elapsed time:  33.199172258377075\n",
      "idx:  150  Epoch:  72  loss:  7.5696235  Elapsed time:  36.23230004310608\n",
      "idx:  200  Epoch:  72  loss:  6.22764  Elapsed time:  33.04059600830078\n",
      "idx:  250  Epoch:  72  loss:  6.5170274  Elapsed time:  34.50861191749573\n",
      "idx:  300  Epoch:  72  loss:  6.753977  Elapsed time:  34.7170250415802\n",
      "idx:  350  Epoch:  72  loss:  7.1028485  Elapsed time:  34.13012504577637\n",
      "idx:  400  Epoch:  72  loss:  6.7482357  Elapsed time:  36.071187019348145\n",
      "idx:  450  Epoch:  72  loss:  7.053091  Elapsed time:  34.62301182746887\n",
      "idx:  500  Epoch:  72  loss:  7.0981054  Elapsed time:  32.31426191329956\n",
      "idx:  550  Epoch:  72  loss:  6.1884937  Elapsed time:  35.02289915084839\n",
      "idx:  600  Epoch:  72  loss:  6.840746  Elapsed time:  32.15188002586365\n",
      "idx:  650  Epoch:  72  loss:  6.391436  Elapsed time:  34.40276122093201\n",
      "idx:  700  Epoch:  72  loss:  7.074716  Elapsed time:  34.5940899848938\n",
      "idx:  750  Epoch:  72  loss:  6.189944  Elapsed time:  34.470624923706055\n",
      "idx:  800  Epoch:  72  loss:  6.231619  Elapsed time:  33.866132974624634\n",
      "idx:  850  Epoch:  72  loss:  7.3560348  Elapsed time:  33.015093088150024\n",
      "idx:  900  Epoch:  72  loss:  6.3489223  Elapsed time:  34.25055718421936\n",
      "idx:  950  Epoch:  72  loss:  5.869802  Elapsed time:  34.15101170539856\n",
      "idx:  1000  Epoch:  72  loss:  5.602315  Elapsed time:  32.58966684341431\n",
      "idx:  1050  Epoch:  72  loss:  6.474341  Elapsed time:  34.59537386894226\n",
      "idx:  1100  Epoch:  72  loss:  6.4255  Elapsed time:  34.881316900253296\n",
      "idx:  1150  Epoch:  72  loss:  6.761484  Elapsed time:  35.595354080200195\n",
      "idx:  1200  Epoch:  72  loss:  6.467138  Elapsed time:  35.01573610305786\n",
      "idx:  1250  Epoch:  72  loss:  5.724991  Elapsed time:  33.96583795547485\n",
      "idx:  1300  Epoch:  72  loss:  7.0054016  Elapsed time:  34.00966811180115\n",
      "idx:  1350  Epoch:  72  loss:  7.0834956  Elapsed time:  33.220404863357544\n",
      "idx:  1400  Epoch:  72  loss:  5.4368596  Elapsed time:  33.91336703300476\n",
      "idx:  0  Epoch:  73  loss:  6.5037193  Elapsed time:  33.30959105491638\n",
      "idx:  50  Epoch:  73  loss:  6.7036285  Elapsed time:  34.83087635040283\n",
      "idx:  100  Epoch:  73  loss:  5.771363  Elapsed time:  33.343863010406494\n",
      "idx:  150  Epoch:  73  loss:  7.2797236  Elapsed time:  34.876924991607666\n",
      "idx:  200  Epoch:  73  loss:  6.219615  Elapsed time:  33.62247276306152\n",
      "idx:  250  Epoch:  73  loss:  6.195995  Elapsed time:  33.08977007865906\n",
      "idx:  300  Epoch:  73  loss:  7.6498146  Elapsed time:  35.014317989349365\n",
      "idx:  350  Epoch:  73  loss:  5.831849  Elapsed time:  33.6747260093689\n",
      "idx:  400  Epoch:  73  loss:  6.1800327  Elapsed time:  34.05060291290283\n",
      "idx:  450  Epoch:  73  loss:  6.9877424  Elapsed time:  35.260281801223755\n",
      "idx:  500  Epoch:  73  loss:  6.593806  Elapsed time:  33.94643211364746\n",
      "idx:  550  Epoch:  73  loss:  5.828577  Elapsed time:  36.413503885269165\n",
      "idx:  600  Epoch:  73  loss:  6.213083  Elapsed time:  35.49607992172241\n",
      "idx:  650  Epoch:  73  loss:  6.588967  Elapsed time:  36.421419858932495\n",
      "idx:  700  Epoch:  73  loss:  6.6082706  Elapsed time:  35.67821907997131\n",
      "idx:  750  Epoch:  73  loss:  5.7392764  Elapsed time:  35.82242703437805\n",
      "idx:  800  Epoch:  73  loss:  6.743213  Elapsed time:  34.834994077682495\n",
      "idx:  850  Epoch:  73  loss:  7.088736  Elapsed time:  35.00727105140686\n",
      "idx:  900  Epoch:  73  loss:  5.367077  Elapsed time:  34.623517990112305\n",
      "idx:  950  Epoch:  73  loss:  6.4096036  Elapsed time:  35.11740493774414\n",
      "idx:  1000  Epoch:  73  loss:  5.4948406  Elapsed time:  31.48685312271118\n",
      "idx:  1050  Epoch:  73  loss:  6.5890527  Elapsed time:  35.484922885894775\n",
      "idx:  1100  Epoch:  73  loss:  4.9523273  Elapsed time:  34.54731607437134\n",
      "idx:  1150  Epoch:  73  loss:  5.412141  Elapsed time:  35.16978597640991\n",
      "idx:  1200  Epoch:  73  loss:  7.346486  Elapsed time:  35.05799984931946\n",
      "idx:  1250  Epoch:  73  loss:  6.153549  Elapsed time:  33.31476879119873\n",
      "idx:  1300  Epoch:  73  loss:  6.48358  Elapsed time:  33.56090021133423\n",
      "idx:  1350  Epoch:  73  loss:  6.452335  Elapsed time:  35.579407930374146\n",
      "idx:  1400  Epoch:  73  loss:  5.988543  Elapsed time:  36.35980200767517\n",
      "idx:  0  Epoch:  74  loss:  6.168172  Elapsed time:  35.160061836242676\n",
      "idx:  50  Epoch:  74  loss:  6.209452  Elapsed time:  34.934438943862915\n",
      "idx:  100  Epoch:  74  loss:  5.782666  Elapsed time:  35.771337032318115\n",
      "idx:  150  Epoch:  74  loss:  6.6470385  Elapsed time:  35.90782690048218\n",
      "idx:  200  Epoch:  74  loss:  5.453441  Elapsed time:  35.20781588554382\n",
      "idx:  250  Epoch:  74  loss:  6.438993  Elapsed time:  34.93942594528198\n",
      "idx:  300  Epoch:  74  loss:  6.3976727  Elapsed time:  35.049355030059814\n",
      "idx:  350  Epoch:  74  loss:  5.6048527  Elapsed time:  33.788236141204834\n",
      "idx:  400  Epoch:  74  loss:  6.0210795  Elapsed time:  33.56628394126892\n",
      "idx:  450  Epoch:  74  loss:  6.3251944  Elapsed time:  34.693864822387695\n",
      "idx:  500  Epoch:  74  loss:  7.090611  Elapsed time:  35.32646918296814\n",
      "idx:  550  Epoch:  74  loss:  6.545938  Elapsed time:  34.94346380233765\n",
      "idx:  600  Epoch:  74  loss:  6.674718  Elapsed time:  33.743953227996826\n",
      "idx:  650  Epoch:  74  loss:  6.5415616  Elapsed time:  34.36587691307068\n",
      "idx:  700  Epoch:  74  loss:  6.444693  Elapsed time:  34.75771498680115\n",
      "idx:  750  Epoch:  74  loss:  6.4205036  Elapsed time:  34.61197304725647\n",
      "idx:  800  Epoch:  74  loss:  5.876941  Elapsed time:  33.88487505912781\n",
      "idx:  850  Epoch:  74  loss:  6.072334  Elapsed time:  35.068268060684204\n",
      "idx:  900  Epoch:  74  loss:  5.9891624  Elapsed time:  33.40354084968567\n",
      "idx:  950  Epoch:  74  loss:  6.6375647  Elapsed time:  32.07350707054138\n",
      "idx:  1000  Epoch:  74  loss:  6.1664476  Elapsed time:  33.94201302528381\n",
      "idx:  1050  Epoch:  74  loss:  6.049499  Elapsed time:  32.073415994644165\n",
      "idx:  1100  Epoch:  74  loss:  5.9462824  Elapsed time:  32.689666748046875\n",
      "idx:  1150  Epoch:  74  loss:  6.3803034  Elapsed time:  34.59563899040222\n",
      "idx:  1200  Epoch:  74  loss:  6.634288  Elapsed time:  35.37873315811157\n",
      "idx:  1250  Epoch:  74  loss:  6.5565658  Elapsed time:  34.835334062576294\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "idx:  1300  Epoch:  74  loss:  6.678636  Elapsed time:  34.651777029037476\n",
      "idx:  1350  Epoch:  74  loss:  6.092548  Elapsed time:  36.61844301223755\n",
      "idx:  1400  Epoch:  74  loss:  6.770268  Elapsed time:  33.97962498664856\n",
      "idx:  0  Epoch:  75  loss:  6.456373  Elapsed time:  34.75300097465515\n",
      "idx:  50  Epoch:  75  loss:  6.4944963  Elapsed time:  35.06884407997131\n",
      "idx:  100  Epoch:  75  loss:  6.4228005  Elapsed time:  33.43140506744385\n",
      "idx:  150  Epoch:  75  loss:  6.1284833  Elapsed time:  35.102439165115356\n",
      "idx:  200  Epoch:  75  loss:  6.1562834  Elapsed time:  35.6652729511261\n",
      "idx:  250  Epoch:  75  loss:  5.744483  Elapsed time:  34.357070207595825\n",
      "idx:  300  Epoch:  75  loss:  5.6473784  Elapsed time:  35.63056707382202\n",
      "idx:  350  Epoch:  75  loss:  6.586508  Elapsed time:  36.52735090255737\n",
      "idx:  400  Epoch:  75  loss:  5.864354  Elapsed time:  33.901227951049805\n",
      "idx:  450  Epoch:  75  loss:  6.9453106  Elapsed time:  31.922008991241455\n",
      "idx:  500  Epoch:  75  loss:  6.418118  Elapsed time:  34.13014483451843\n",
      "idx:  550  Epoch:  75  loss:  5.483859  Elapsed time:  32.080873012542725\n",
      "idx:  600  Epoch:  75  loss:  7.3894424  Elapsed time:  34.512176275253296\n",
      "idx:  650  Epoch:  75  loss:  6.122752  Elapsed time:  34.46532726287842\n",
      "idx:  700  Epoch:  75  loss:  5.63704  Elapsed time:  35.13754105567932\n",
      "idx:  750  Epoch:  75  loss:  6.7961135  Elapsed time:  35.27373790740967\n",
      "idx:  800  Epoch:  75  loss:  7.199467  Elapsed time:  34.62325310707092\n",
      "idx:  850  Epoch:  75  loss:  6.831984  Elapsed time:  34.52308130264282\n",
      "idx:  900  Epoch:  75  loss:  6.267133  Elapsed time:  35.781710147857666\n",
      "idx:  950  Epoch:  75  loss:  7.5302134  Elapsed time:  35.41130614280701\n",
      "idx:  1000  Epoch:  75  loss:  7.0107365  Elapsed time:  35.09135389328003\n",
      "idx:  1050  Epoch:  75  loss:  6.3843455  Elapsed time:  33.390486001968384\n",
      "idx:  1100  Epoch:  75  loss:  6.783688  Elapsed time:  37.021119117736816\n",
      "idx:  1150  Epoch:  75  loss:  7.5797243  Elapsed time:  33.81658220291138\n",
      "idx:  1200  Epoch:  75  loss:  6.094034  Elapsed time:  33.84523892402649\n",
      "idx:  1250  Epoch:  75  loss:  5.5777173  Elapsed time:  33.73861289024353\n",
      "idx:  1300  Epoch:  75  loss:  6.7390366  Elapsed time:  32.2866849899292\n",
      "idx:  1350  Epoch:  75  loss:  7.136838  Elapsed time:  34.66660976409912\n",
      "idx:  1400  Epoch:  75  loss:  6.1201406  Elapsed time:  34.42660093307495\n",
      "idx:  0  Epoch:  76  loss:  5.473502  Elapsed time:  35.71638607978821\n",
      "idx:  50  Epoch:  76  loss:  6.518454  Elapsed time:  34.986719846725464\n",
      "idx:  100  Epoch:  76  loss:  6.6475286  Elapsed time:  33.284735441207886\n",
      "idx:  150  Epoch:  76  loss:  6.7490263  Elapsed time:  31.867292165756226\n",
      "idx:  200  Epoch:  76  loss:  5.1597986  Elapsed time:  33.01049518585205\n",
      "idx:  250  Epoch:  76  loss:  6.403574  Elapsed time:  36.66115093231201\n",
      "idx:  300  Epoch:  76  loss:  6.26918  Elapsed time:  41.098777055740356\n",
      "idx:  350  Epoch:  76  loss:  6.434817  Elapsed time:  605.9918129444122\n",
      "idx:  400  Epoch:  76  loss:  5.884365  Elapsed time:  1165.5234470367432\n",
      "idx:  450  Epoch:  76  loss:  6.2626004  Elapsed time:  606.6725451946259\n"
     ]
    }
   ],
   "source": [
    "train()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:<tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell object at 0x15540dba8>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.\n",
      "WARNING:tensorflow:<tensorflow.python.ops.rnn_cell_impl.BasicLSTMCell object at 0x15540dc18>: Using a concatenated state is slower and will soon be deprecated.  Use state_is_tuple=True.\n",
      "INFO:tensorflow:Restoring parameters from ./models/model-70\n",
      "0 ./data/testing_data/feat/ScdUht-pM6s_53_63.avi.npy\n",
      "a man is putting a fish on a large bottle \n",
      "\n",
      "1 ./data/testing_data/feat/wkgGxsuNVSg_34_41.avi.npy\n",
      "a woman is standing in a field \n",
      "\n",
      "2 ./data/testing_data/feat/BtQtRGI0F2Q_15_20.avi.npy\n",
      "a man is doing a stunt on a wall \n",
      "\n",
      "3 ./data/testing_data/feat/k06Ge9ANKM8_5_16.avi.npy\n",
      "a woman is playing with a ball \n",
      "\n",
      "4 ./data/testing_data/feat/sZf3VDsdDPM_107_114.avi.npy\n",
      "a man is putting a woman in a hand \n",
      "\n",
      "5 ./data/testing_data/feat/shPymuahrsc_5_12.avi.npy\n",
      "a cat is meowing \n",
      "\n",
      "6 ./data/testing_data/feat/XOAgUVVwKEA_8_20.avi.npy\n",
      "a baby is putting on a baby \n",
      "\n",
      "7 ./data/testing_data/feat/ufFT2BWh3BQ_0_8.avi.npy\n",
      "a panda is climbing on a ground \n",
      "\n",
      "8 ./data/testing_data/feat/5YJaS2Eswg0_22_26.avi.npy\n",
      "a man is falling on a road \n",
      "\n",
      "9 ./data/testing_data/feat/lw7pTwpx0K0_38_48.avi.npy\n",
      "a man is placing a food in a pan \n",
      "\n",
      "10 ./data/testing_data/feat/UbmZAe5u5FI_132_141.avi.npy\n",
      "a person is cutting a shrimp \n",
      "\n",
      "11 ./data/testing_data/feat/xCFCXzDUGjY_5_9.avi.npy\n",
      "a man is playing with a large crowd \n",
      "\n",
      "12 ./data/testing_data/feat/He7Ge7Sogrk_47_70.avi.npy\n",
      "a man is doing a bike \n",
      "\n",
      "13 ./data/testing_data/feat/tJHUH9tpqPg_113_118.avi.npy\n",
      "a woman is taking a dough \n",
      "\n",
      "14 ./data/testing_data/feat/n016q1w8Q30_2_11.avi.npy\n",
      "a person is slicing a potato \n",
      "\n",
      "15 ./data/testing_data/feat/RjpbFlOHFps_8_25.avi.npy\n",
      "a man is riding a horse \n",
      "\n",
      "16 ./data/testing_data/feat/6JnGBs88sL0_4_10.avi.npy\n",
      "a woman is riding a bike \n",
      "\n",
      "17 ./data/testing_data/feat/EpMuCrbxE8A_107_115.avi.npy\n",
      "a man is playing a guitar \n",
      "\n",
      "18 ./data/testing_data/feat/HAjwXjwN9-A_16_24.avi.npy\n",
      "a man is playing a basketball \n",
      "\n",
      "19 ./data/testing_data/feat/4xVGpDmA4lE_23_33.avi.npy\n",
      "a man is walking \n",
      "\n",
      "20 ./data/testing_data/feat/k5OKBX2e7xA_19_32.avi.npy\n",
      "a girl is performing a trick \n",
      "\n",
      "21 ./data/testing_data/feat/Jag7oTemldY_12_25.avi.npy\n",
      "a man is talking on a muddy area \n",
      "\n",
      "22 ./data/testing_data/feat/8MVo7fje_oE_125_130.avi.npy\n",
      "a man is pouring a container \n",
      "\n",
      "23 ./data/testing_data/feat/bqMmyY1ImkI_0_14.avi.npy\n",
      "the man is putting on the grass \n",
      "\n",
      "24 ./data/testing_data/feat/jTnrm338_KY_34_42.avi.npy\n",
      "a person is cutting a piece of garlic \n",
      "\n",
      "25 ./data/testing_data/feat/UdcObAQ5OOM_15_30.avi.npy\n",
      "a man is riding a song on a stage \n",
      "\n",
      "26 ./data/testing_data/feat/4PcL6-mjRNk_11_18.avi.npy\n",
      "a man is playing a car \n",
      "\n",
      "27 ./data/testing_data/feat/3qqEKTPxLNs_1_15.avi.npy\n",
      "a baby is playing with a toy \n",
      "\n",
      "28 ./data/testing_data/feat/glrijRGnmc0_211_215.avi.npy\n",
      "a man is preparing a piece of bread \n",
      "\n",
      "29 ./data/testing_data/feat/q7pOFn8s4zc_263_273.avi.npy\n",
      "a man is playing a woman \n",
      "\n",
      "30 ./data/testing_data/feat/mtrCf667KDk_134_176.avi.npy\n",
      "a woman is cutting a mushroom \n",
      "\n",
      "31 ./data/testing_data/feat/0lh_UWF9ZP4_62_69.avi.npy\n",
      "a woman is breaking some meat \n",
      "\n",
      "32 ./data/testing_data/feat/JntMAcTlOF0_50_70.avi.npy\n",
      "a man is walking with a large garden \n",
      "\n",
      "33 ./data/testing_data/feat/7NNg0_n-bS8_21_30.avi.npy\n",
      "a man is playing a guitar \n",
      "\n",
      "34 ./data/testing_data/feat/IhwPQL9dFYc_124_129.avi.npy\n",
      "a woman is cutting a piece of meat \n",
      "\n",
      "35 ./data/testing_data/feat/BAf3LXFUaGs_28_38.avi.npy\n",
      "a man is carrying a group of people \n",
      "\n",
      "36 ./data/testing_data/feat/6q1dX6thX3E_286_295.avi.npy\n",
      "a man is speaking \n",
      "\n",
      "37 ./data/testing_data/feat/RZL9irxnhZ0_34_40.avi.npy\n",
      "a man is showing a drink \n",
      "\n",
      "38 ./data/testing_data/feat/WWf0Z6ak3Dg_5_15.avi.npy\n",
      "a man is playing with a large ball \n",
      "\n",
      "39 ./data/testing_data/feat/PeUHy0A1GF0_114_121.avi.npy\n",
      "a woman is preparing some meat \n",
      "\n",
      "40 ./data/testing_data/feat/klteYv1Uv9A_27_33.avi.npy\n",
      "a man is riding a bike \n",
      "\n",
      "41 ./data/testing_data/feat/e-j59PqJjSM_405_416.avi.npy\n",
      "a person is mixing a bowl \n",
      "\n",
      "42 ./data/testing_data/feat/778mkceE0UQ_40_46.avi.npy\n",
      "a car is driving \n",
      "\n",
      "43 ./data/testing_data/feat/77iDIp40m9E_126_131.avi.npy\n",
      "a monkey is riding a bike \n",
      "\n",
      "44 ./data/testing_data/feat/e-j59PqJjSM_50_98.avi.npy\n",
      "a man is slicing an onion \n",
      "\n",
      "45 ./data/testing_data/feat/Dgf0VHMEtNs_57_66.avi.npy\n",
      "a woman is taking a large piece of liquid \n",
      "\n",
      "46 ./data/testing_data/feat/f9Won2JpOEU_60_80.avi.npy\n",
      "a cat is playing with a ball \n",
      "\n",
      "47 ./data/testing_data/feat/dfOuTx66bJU_34_39.avi.npy\n",
      "a man is walking on a field \n",
      "\n",
      "48 ./data/testing_data/feat/04Gt01vatkk_248_265.avi.npy\n",
      "a man is cutting a vegetable \n",
      "\n",
      "49 ./data/testing_data/feat/rl1rVk_xIOs_1_16.avi.npy\n",
      "a man is making a ball \n",
      "\n"
     ]
    }
   ],
   "source": [
    "test()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
